err_score: Computes various scores useful for evaluating prediction...

Description Usage Arguments Details Value Examples

Description

Computes various scores useful for evaluating prediction accuracy

Usage

1
err_score(actual, predicted, slc = TRUE, m = "rmse")

Arguments

actual

numeric vector with known values

predicted

numeric vector with predicted values

slc

logical vector indicating which values to use (default: all of them)

m

score, can be either "rmse" (root mean squared error), "mad" (mean absolute error) or "cor" (Pearon's correlation).

Details

Missing values are ignored, ie. the score is computed based on complete cases.

Value

scalar score

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 ## Not run: 


 a <- rnorm(10)
 b <- rnorm(10)
 
 err_score(a,b)

 
## End(Not run) 

sumtxt/datatools documentation built on May 30, 2019, 8:38 p.m.