R2 {DiceEval} | R Documentation |
Multiple R-Squared
Description
Coefficient of determination
Usage
R2(Y, Ypred)
Arguments
Y |
a real vector with the values of the output |
Ypred |
a real vector with the predicted values at the same inputs |
Value
where is the residual sum of squares
and is the total sum of squares.
Note that the order of the input argument is important.
Author(s)
D. Dupuy
Examples
X <- seq(-1,1,0.1)
Y <- 3*X + rnorm(length(X),0,0.5)
Ypred <- 3*X
print(R2(Y,Ypred))
[Package DiceEval version 1.6.1 Index]