r2_score
Module: strata.metrics • Kind: function
Source: strata/metrics/regression.mojo
def r2_score[ true_dtype: DType = DType.float64, pred_dtype: DType = DType.float64,]( y_true: List[Scalar[true_dtype]], y_pred: List[Scalar[pred_dtype]],) -> Float64from strata.metrics import r2_scoreCompute (coefficient of determination) regression score function.
Returns: Float64 — Float64: score (best possible score is 1.0, can be negative for arbitrarily worse models).