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

This commit is contained in:
77
2024-12-27 14:49:23 +08:00
parent bf5f11ec14
commit 263e94a144
+2 -1
View File
@@ -72,4 +72,5 @@ if __name__ == "__main__":
# 测试单个数据
test_sample = X_test[11] # 选择第12个样本(从0开始计数)
y_pred_single = predict_svm(test_sample.reshape(1, -1), weights, bias)
print(f"\n单个样本预测结果: {y_pred_single[0]}, 实际结果: {y_test[11]}")
print(f"\n单个样本预测结果: {y_pred_single[0]}, 实际结果: {y_test[11]}")