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

This commit is contained in:
2024-11-03 16:19:57 +08:00
parent 7fa7bb6394
commit cf8ea34217
+1 -1
View File
@@ -90,6 +90,6 @@ if __name__ == "__main__":
# 训练对率回归模型 # 训练对率回归模型
weights = train_logreg(X_train, y_train, learning_rate=0.01, iterations=1000) weights = train_logreg(X_train, y_train, learning_rate=0.01, iterations=1000)
# 测试单个数据 # 测试单个数据
y_pred = predict_logreg(X_test[11], weights) y_pred = predict_logreg(X_test[11], weights)
print(f"预测结果: {y_pred}, 实际结果: {y_test[11]}") print(f"预测结果: {y_pred}, 实际结果: {y_test[11]}")