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

This commit is contained in:
2024-10-31 15:42:09 +08:00
parent 8810c9d424
commit 5a394273b4
+2 -1
View File
@@ -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) 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]}")