diff --git a/function.py b/function.py index ddd8604..ae9b670 100644 --- a/function.py +++ b/function.py @@ -67,7 +67,7 @@ def predict_logreg(inX, weights): Returns: - int: 预测的分类标签。 """ - z = np.dot(inX, weights) + z = np.dot(inX, weights) prediction_prob = 1 / (1 + np.exp(-z)) return 1 if prediction_prob >= 0.5 else 0