Runs the test defined in a predictionTest
or
baselineAlgTest
object
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)
runTest
returns an object of class
predictionResult
or baselineAlgResult
.
An object of class baselineAlgTest
or subclass of predictionTest
(currently
PLSRTest
or
ridgeRegressionTest
). The object specify the
test to be run
A matrix. The spectra to use in the test
A vector or matrix. The response(s) to use in the test
A predictionTest
object,
describing the prediction test to use for this baseline algorithm
test
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
Logical, specifying whether the test should print out
progress information. Default is FALSE
Other arguments. Currently only used by the
baselineAlgTest
method.
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
Bjørn-Helge Mevik and Kristian Hovde Liland
baselineAlgTest
,
predictionTest
, PLSRTest
,
ridgeRegressionTest