generated from LufsX/Experiment-LogReg
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ if __name__ == "__main__":
|
||||
model = train_logreg(X_train, y_train)
|
||||
|
||||
# 预测
|
||||
y_pred = model.predict(preprocess_data(X_test)) # 直接在测试集上预测
|
||||
y_pred = predict_logreg(model, X_test) # 调用预测函数
|
||||
|
||||
# 计算准确率
|
||||
accuracy = np.mean(y_pred == y_test)
|
||||
|
||||
Reference in New Issue
Block a user