postResampleSpectro: Calculates performance indictors across resamples

Description Usage Arguments Details Author(s) Examples

View source: R/performance.R

Description

Given two numeric vectors of data, the root mean squared error, the R-squared, the bias, the RPD, the RPIQ, the CCC and the standard error are calculated. For two factors, the overall agreement rate and Kappa are determined.

Usage

1
2
postResampleSpectro(pred, obs)
spectroSummary(data, lev = NULL, model = NULL)

Arguments

data

a data frame or matrix with columns obs and pred for the observed and predicted outcomes

lev

a character vector of factors levels for the response. In regression cases, this would be NULL.

model

a character string for the model name

pred

A vector of numeric data

obs

A vector of numeric data

Details

This function extends postResample in the caret package.

Author(s)

Pierre Roudier, adapted from code from Max Kuhn

Examples

1
2
3
predicted <-  matrix(rnorm(50), ncol = 5)
observed <- rnorm(10)
apply(predicted, 2, postResampleSpectro, obs = observed)

spectacles documentation built on Jan. 13, 2021, 8:46 a.m.