generated from LufsX/Experiment-LogReg
This commit is contained in:
+2
-2
@@ -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]}")
|
||||
Reference in New Issue
Block a user