Learn R Programming

baseline (version 1.3-5)

runTest: Run a predictionTest or baselineAlgTest

Description

Runs the test defined in a predictionTest or baselineAlgTest object

Usage

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

Value

runTest returns an object of class predictionResult or baselineAlgResult.

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.

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

Bjørn-Helge Mevik and Kristian Hovde Liland

See Also

baselineAlgTest, predictionTest, PLSRTest, ridgeRegressionTest