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

This commit is contained in:
2024-11-02 12:18:31 +08:00
parent bc57536428
commit bdd5375ba8
+2 -2
View File
@@ -51,7 +51,7 @@ if __name__ == '__main__':
# 训练模型
classifier = colicSklearn()
# 假设我们要测试测试集中的第12个样本(索引为11,因为索引从0开始)
single_sample = testSet[11] # 请确保testSet已经包含测试集的数据
single_sample = testSet[11]
y_pred = predict_logreg(single_sample, classifier)
print(f"预测结果: {y_pred}, 实际结果: {testLabels[11]}")