Regression
Adjusted R²
Implemented
regression.adjusted_r2Definition
R² penalised for the number of predictors in the model.
Formula
R²ₐ = 1 − (1 − R²)(N − 1) / (N − p − 1)
Range: (−∞, 1]
Inputs and outputs
- y_true: array of real targets
- y_pred: array of real predictions
- sample_weight: optional
- n_features: number of predictors p
Returns: float
Assumptions
- Requires N > p + 1.
Limitations
No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.
Python API
import evalsuite as es
es.adjusted_r2(y_true_r, y_pred_r, n_features=3)References
Primary references for this entry have not been added yet.