cvApply-methods {Cardinal} | R Documentation |
Apply an existing or a user-specified function over imaging datasets.
## S4 method for signature 'SImageSet' cvApply(.x, .y, .fun, .fold = sample, ...)
.x |
An object of class |
.y |
An appropriate response variable. |
.fun |
The function to be used for the analyses. |
.fold |
A variable determining the cross-validation folds. By default, this will set to 'sample' from |
... |
Additional arguments passed to |
This method is designed to be used with the provided classification methods, but can also be used with user-provided functions and methods as long as they fulfill certain expectations.
The function or method passed to '.fun' must take at least two arguments: the first argument must be a object derived from SImageSet
, and the second argument must be the response variable. The function should return an object of a class derived from ResultSet
, which should have a predict
method that takes arguments 'newx' and 'newy'.
An object of class 'CrossValidated', which is derived from ResultSet
.
Kylie A. Bemis
PLS
,
OPLS
,
spatialShrunkenCentroids