postResampleSpectro {spectacles}R Documentation

Calculates performance indictors across resamples

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

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

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

[Package spectacles version 0.5-4 Index]