R² regression score (R2)

../../../../_images/roc_curve.svg

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: table
Description: Y-prob
Y-true
Type: table
Description: Y-true

Output ports

r2 score
Type: table
Description: r2 score

Examples

The node can be found in:

Implementation

class node_metrics.R2Score[source]