r_square: coefficient of determination (R^2)

View source: R/computation.R

r_squareR Documentation

coefficient of determination (R^2)

Description

coefficient of determination (R^2)

Usage

r_square(y_true, y_pred)

Arguments

y_true

A numeric vector with ground truth values.

y_pred

A numeric vector with predicted values.

Value

R^2 value

Examples

y <- rnorm(100)
y_pred <- y + rnorm(100, sd = 0.5)
r_square(y, y_pred)

thisutils documentation built on July 3, 2025, 9:09 a.m.