更新 function.py
Gitea Actions Test / Challenge-Actions (push) Successful in 46s

This commit is contained in:
cy
2024-12-03 09:37:42 +08:00
parent 843c24a82e
commit 8f049ba58d
+1 -1
View File
@@ -147,6 +147,6 @@ if __name__ == "__main__":
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)
print(f"\n单个样本预测结果: {y_pred_single}, 实际结果: {y_final_test[11]}")