diff --git a/machine_learning/logistic_regression.py b/machine_learning/logistic_regression.py index 2e28fd96b..de0cfd54d 100644 --- a/machine_learning/logistic_regression.py +++ b/machine_learning/logistic_regression.py @@ -55,6 +55,7 @@ def logistic_reg(alpha,X,y,max_iterations=70000): if iterations== max_iterations: print("Maximum iterations exceeded!") + print("Minimal cost function J=",J) converged=True return theta