Learn R Programming

fdm2id (version 0.9.5)

evaluation.r2: R2 evaluation of regression predictions

Description

Evaluation predictions of a regression model according to R2

Usage

evaluation.r2(predictions, targets)

Arguments

predictions

The predictions of a regression model (vector).

targets

Actual targets of the dataset (vector).

Value

The evaluation of the predictions (numeric value).

See Also

evaluation.msep, evaluation

Examples

Run this code
# NOT RUN {
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.r2 (pred.linreg, d$test.y)
# }

Run the code above in your browser using DataLab