rsquared¶
-
getml.pipeline.metrics.
rsquared
= 'rsquared'¶ \(R^{2}\) - squared correlation coeefficient between predictions and targets.
Used for regression problems.
\(R^{2}\) is defined as follows:
\[R^{2} = \frac{(\sum_{i=1}^n ( y_i - \bar{y_i} ) * ( \hat{y_i} - \bar{\hat{y_i}} ))^2 }{\sum_{i=1}^n ( y_i - \bar{y_i} )^2 \sum_{i=1}^n ( \hat{y_i} - \bar{\hat{y_i}} )^2 },\]where \(y_i\) are the true values, \(\hat{y_i}\) are the predictions and \(\bar{...}\) denotes the mean operator.
An \(R^{2}\) of 1 implies perfect correlation between the predictions and the targets and an \(R^{2}\) of 0 implies no correlation at all.