Skip to content

Home / Glossary / R² (R-squared)

Statistics

R² (R-squared)

Proportion of variance in the outcome explained by the model.

R² ranges from 0 (model explains nothing) to 1 (model explains everything). In finance, even a high-performing ML model might have an R² of just 0.03 — predicting markets is genuinely hard.

Example

from sklearn.metrics import r2_score
r2 = r2_score(y_test, y_pred)

Practise R² (R-squared) hands-on — free, in your browser

Related terms