diff --git a/function.py b/function.py index 2b26b17..c1cb599 100644 --- a/function.py +++ b/function.py @@ -149,4 +149,5 @@ if __name__ == "__main__": weights, selector = train_logreg(X_train, y_train, learning_rate=0.0001, iterations=5000, batch_size=32, lambda_=0.1, degree=2) # 测试单个数据 - y_pred = predict_logreg(X_test[11], weights + y_pred = predict_logreg(X_test[11], weights, selector=selector, degree=2) + print(f"预测结果: {y_pred}, 实际结果: {y_test[11]}")