caret::safs | R Documentation |
safs
Methods for function safs
in package caret. Please refer to help pages in the caret-package for further information.
## S4 method for signature 'Speclib' safs(x, y, cutoff = 0.95, returnData = TRUE, na.rm = FALSE, ...) ## S4 method for signature 'Nri' safs(x, y, cutoff = 0.95, returnData = TRUE, na.rm = FALSE, ...) ## S4 method for signature 'Specfeat' safs(x, y, cutoff = 0.95, returnData = TRUE, na.rm = FALSE, ...) get_safs(x)
x |
Object of class |
y |
A numeric or factor vector containing the outcome for each sample. If missing, the response variable set by |
cutoff |
The cutoff value of the correlation coefficients between response variables. |
returnData |
Logical. If TRUE, the updated object of |
na.rm |
Logical. If TRUE, all variables are excluded which contain at least one non-finite value. |
... |
Further aruments passed to |
If returnData == TRUE
, an object of class Speclib
or Nri
, otherwise an object of class safs
. Note that if x
is an object of class Specfeat
, the function returns an object of class Speclib
containing the relevant transformed band values.
Lukas Lehnert
safs
## Not run: data(spectral_data) ## Set response variable (Chlorophyll content) spectral_data <- setResponse(spectral_data, "chlorophyll") ## Set additional predictor variables from the SI spectral_data <- setPredictor(spectral_data, "season") ## Supervised feature selection using simulated annealing ## Note that this may take some time! safs_res <- safs(spectral_data) get_safs(safs_res) plot(get_safs(safs_res)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.