[scikit-learn] Logistic regression doesnt converge?
Mahesh Chandra
mmahesh.chandra873 at gmail.com
Sat Feb 11 09:18:50 EST 2017
>reg = 0.1
lr = LogisticRegression(C=1/reg,max_iter=100,
fit_intercept=True,solver='lbfgs').fit(X_train, y_train)
ytrain_hat = lr.predict_proba(X_train)
loss = log_loss(y_train,ytrain_hat)
print loss
print loss + 0.5*reg*LA.norm(lr.coef_)
Maybe i am doing it wrong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170211/795d082f/attachment.html>
More information about the scikit-learn
mailing list