
safs
safs
in package caret.
"safs"(x, y, cutoff = 0.95, returnData = TRUE, ...)
"safs"(x, y, cutoff = 0.95, returnData = TRUE, ...)
"safs"(x, y, cutoff = 0.95, returnData = TRUE, ...)
get_safs(x)
Speclib
, Nri
or Specfeat
. For get_safs
, x
must be the output of safs
as Speclib
or Nri
.
setResponse
is used.
x
is returned, otherwise only the result of safs
is returned.
safs
.
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.
safs
## Not run:
# data(spectral_data)
#
# ## Set response variable (Chlorophyll content)
# spectral_data <- setResponse(spectral_data, "chlorophyll")
#
# ## Set additional predictor variables from the attributes
# 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)
Run the code above in your browser using DataLab