score_r2: Compute R-squared between numeric observations and predictions
Description
Internal function to compute the R-squared of observations versus predictions via stats::cor(). Used within f_numeric_glm(), f_numeric_gam(), f_numeric_rf(), f_count_glm(), and f_count_gam().
(optional) Internal args (e.g. function_name for
validate_arg_function_name, a precomputed correlation matrix
m, or cross-validation args for preference_order).
See Also
Other modelling_tools:
case_weights(),
model_formula(),
score_auc(),
score_cramer()