evaluation.adjr2: Adjusted R2 evaluation of regression predictions

evaluation.adjr2R Documentation

Adjusted R2 evaluation of regression predictions

Description

Evaluation predictions of a regression model according to the adjusted R2, i.e. the R2 penalized by the number of variables used by the model.

Usage

evaluation.adjr2(predictions, gt, nrow = length(predictions), ncol, ...)

Arguments

predictions

The predictions of a regression model (vector).

gt

The ground truth (vector).

nrow

Number of observations (defaults to the number of predictions).

ncol

Number of predictors used by the model. This one has no default: the adjustment cannot be computed without it. The residual degrees of freedom are nrow - ncol - 1, the intercept counting as one parameter; the value is NA when they run out.

...

Other parameters.

Value

The evaluation of the predictions (numeric value).

See Also

evaluation.r2, evaluation.msep, evaluation

Examples

require (datasets)
data (trees)
d = splitdata (trees, 3)
model.linreg = LINREG (d$train.x, d$train.y)
pred.linreg = predict (model.linreg, d$test.x)
evaluation.adjr2 (pred.linreg, d$test.y, ncol = ncol (d$test.x))

fdm2id documentation built on Aug. 28, 2026, 9:07 a.m.