| evaluation.adjr2 | R Documentation |
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.
evaluation.adjr2(predictions, gt, nrow = length(predictions), ncol, ...)
predictions |
The predictions of a regression model ( |
gt |
The ground truth ( |
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 |
... |
Other parameters. |
The evaluation of the predictions (numeric value).
evaluation.r2, evaluation.msep, evaluation
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.