code_3.py 254 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3 4
voting = voting.fit(X_train, y_train) # 拟合模型
y_pred = voting.predict(X_test) # 进行预测
print("Voting测试准确率: {:.2f}%", voting.score(X_test, y_test)*100)
print"Voting测试F1分数:{:.2f}%", f1_scorey_test, y_pred*100