title: how to get the log likelihood for a logistic regression model in sklearn?
body: <p>I'm using a logistic regression model in sklearn and I am interested in retrieving the log likelihood for such a model, so to perform an ordinary likelihood ratio test as suggested <a href="https://stats.stackexchange.com/a/118301/99338">here</a>. </p>
  
  <p>The model is using the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.log_loss.html" rel="nofollow noreferrer">log loss</a> as scoring rule.  In the documentation, the log loss is defined <em>"as the negative log-likelihood of the true labels given a probabilistic classifier’s predictions"</em>. However, the value is always positive, whereas the log likelihood should be negative. As an example:</p>
  
      
  
  <pre class="lang-python prettyprint-override"><code>from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import log_loss
  
  lr = LogisticRegression()
  lr.fit(X_train, y_train)
  y_prob = lr.predict_proba(X_test)
  log_loss(y_test, y_prob)    # 0.66738
  </code></pre>
  
  <p>I do not see any method in the documentation for the model, is there any other possibility that I am currently not aware of?</p>