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().
Arguments
- o
(required, numeric vector) Observations. Default: NULL
- p
(required, numeric vector) Predictions. Default: NULL
- ...
(optional) Internal args (e.g.
function_nameforvalidate_arg_function_name, a precomputed correlation matrixm, or cross-validation args forpreference_order).
See also
Other modelling_tools:
case_weights(),
model_formula(),
score_auc(),
score_cramer()
