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

This commit is contained in:
2024-11-02 16:20:07 +08:00
parent c1c3aa2a5f
commit f4d881c4dd
+3 -1
View File
@@ -103,7 +103,9 @@ def load_data(filepath):
return data, target_variable return data, target_variable
def accuracy(X, y, weights):
predictions = predict_logreg(X, weights)
return np.mean(predictions == y)
# 其余代码保持不变 # 其余代码保持不变
if __name__ == "__main__": if __name__ == "__main__":