Evaluation predictions of a regression model according to R2
evaluation.r2(predictions, gt, ...)
The evaluation of the predictions (numeric value).
The predictions of a regression model (vector
).
The ground truth (vector
).
Other parameters.
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.r2 (pred.linreg, d$test.y)
Run the code above in your browser using DataLab