June 9, 2022, 1:04 p.m. | Tan Nian Wei

Towards Data Science - Medium towardsdatascience.com

When I first started out doing machine learning, I learnt that:

  • R² is the coefficient of determination, a measure of how well is the data explained by the fitted model,
  • R² is the square of the coefficient of correlation, R,
  • R is a quantity that ranges from 0 to 1

Therefore, R² should also range from 0 to 1.

Colour me surprised when the `r2_score` implementation in sklearn returned negative scores. What gives?

If you glossed over the math by …

data science negative regression r-squared statistics

Seeking Developers and Engineers for AI T-Shirt Generator Project

@ Chevon Hicks | Remote

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Stage - Product Owner Assistant - Data Platform / Business Intelligence (M/F)

@ Pernod Ricard | FR - Paris - The Island