runTest: Run a predictionTest or baselineAlgTest

runTestR Documentation

Run a predictionTest or baselineAlgTest

Description

Runs the test defined in a predictionTest or baselineAlgTest object

Usage

runTest(object, X, y, ...)
## S4 method for signature 'PLSRTest'
runTest(object, X, y)
## S4 method for signature 'ridgeRegressionTest'
runTest(object, X, y)
## S4 method for signature 'baselineAlgTest'
runTest(object, X, y, predictionTest, postproc, verbose = FALSE)

Arguments

object

An object of class baselineAlgTest or subclass of predictionTest (currently PLSRTest or ridgeRegressionTest). The object specify the test to be run

X

A matrix. The spectra to use in the test

y

A vector or matrix. The response(s) to use in the test

predictionTest

A predictionTest object, describing the prediction test to use for this baseline algorithm test

postproc

A function, used to postprocess the baseline corrected spectra prior to prediction testing. The function should take a matrix of spectra as its only argument, and return a matrix of postprocessed spectra

verbose

Logical, specifying whether the test should print out progress information. Default is FALSE

...

Other arguments. Currently only used by the baselineAlgTest method.

Value

runTest returns an object of class predictionResult or baselineAlgResult.

Methods

signature(object = "baselineAlgTest")

Baseline corrects the spectra, optionally postprocesses them, and runs a prediction test on the corrected spectra.

signature(object = "PLSRTest")

Runs PLSR on the data and calculates the cross-validated RMSEP

signature(object = "ridgeRegressionTest")

Runs ridge regression on the data and calculates the GCV

Author(s)

Bjørn-Helge Mevik and Kristian Hovde Liland

See Also

baselineAlgTest, predictionTest, PLSRTest, ridgeRegressionTest


baseline documentation built on Nov. 18, 2023, 5:14 p.m.