R² regression score (R2)¶
Computes the R² regression score. Best possible score is 1.0 and it can be negative (because the model can be arbitrarily bad). A constant model that always predicts the expected value of y, disregarding the input features, would get a R² score of 0.0)
Documentation¶
The r2_score function computes the coefficient of determination. It represents the proportion of variance (of y) that has been explained by the independent variables in the model. It provides an indication of goodness of fit and therefore a measure of how well unseen samples are likely to be predicted by the model, through the proportion of explained variance.
Definition¶
Input ports¶
- Y-prob
Type: tableDescription: Y-prob- Y-true
Type: tableDescription: Y-true
Output ports¶
- r2 score
Type: tableDescription: r2 score
Examples¶
The node can be found in:
Implementation¶
- class node_metrics.R2Score[source]