generated from LufsX/Challenge-SVM
This commit is contained in:
+1
-1
@@ -147,6 +147,6 @@ if __name__ == "__main__":
|
|||||||
print(f"测试集准确率: {accuracy * 100:.2f}%")
|
print(f"测试集准确率: {accuracy * 100:.2f}%")
|
||||||
|
|
||||||
# 测试单个数据
|
# 测试单个数据
|
||||||
test_sample = X_final_test[11] # 选择第12个样本(从0开始计数)
|
test_sample = X_final_test[11] # 选择第12个样本(从0开始计数)
|
||||||
y_pred_single = predict_svm(test_sample, best_model)
|
y_pred_single = predict_svm(test_sample, best_model)
|
||||||
print(f"\n单个样本预测结果: {y_pred_single}, 实际结果: {y_final_test[11]}")
|
print(f"\n单个样本预测结果: {y_pred_single}, 实际结果: {y_final_test[11]}")
|
||||||
Reference in New Issue
Block a user