Learn R Programming

rEDM (version 1.8.2)

ComputeError: Compute error

Description

ComputeError evaluates the Pearson correlation coefficient, mean absolute error and root mean square error between two numeric vectors.

Usage

ComputeError(obs, pred)

Arguments

obs

vector of observations.

pred

vector of predictions.

Value

A name list with components:

rho Pearson correlation
MAE mean absolute error
RMSE root mean square error

Examples

Run this code
# NOT RUN {
data(block_3sp)
smplx <- Simplex( dataFrame=block_3sp, lib="1 99", pred="105 190", E=3,
columns="x_t", target="x_t")
err <- ComputeError( smplx$Observations, smplx$Predictions )
# }

Run the code above in your browser using DataLab