Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

postResampleSpectro

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)

spectacles

Storing, Manipulating and Analysis Spectroscopy and Associated Data

v0.5-3
GPL-3
Authors
Pierre Roudier [aut, cre], Max Kuhn [ctb], Kristian Hovde Liland [ctb], Bjorn-Helge Mevik [ctb], Hadley Wickham [ctb], Raphael Viscarra Rossel [dtc]
Initial release
2021-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.