title: How is the R2 value in Scikit learn calculated?
body: <p>The R^2 value returned by scikit learn (<code>metrics.r2_score()</code>) can be negative. The <a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html" rel="noreferrer">docs</a> say: </p>
  
  <blockquote>
    <p>"Unlike most other scores, R² score may be negative (it need not
    actually be the square of a quantity R)."</p>
  </blockquote>
  
  <p>However the <a href="https://en.wikipedia.org/wiki/Coefficient_of_determination" rel="noreferrer">wikipedia article</a> on R^2 mentions no R (not squared) quantity. Perhaps it uses absolute differences instead of square differences. I really have no idea</p>