R2¶
- class R2[source]¶
Bases:
PlibEvaluatorMixin
R2 score function.
Represents the proportion of variance (of y) that has been explained by the independent variables in the model.
- evaluate(predictions, true_values)[source]¶
Base evaluation function.
- Parameters:
predictions (
ndarray
[Any
,dtype
[TypeVar
(_ScalarType_co
, bound=generic
, covariant=True)]]) – predictions of the model to be evaluatedtrue_values (
PlibData
) – true values to evaluate predictions on
- Return type:
float
- Returns:
evaluation score