Description Usage Arguments Value Author(s) See Also Examples
Set predictor variable(s) to be used in model-fitting functions of package caret. This function can be used to define additional predictor variables stored in the SI of a Speclib
- or Nri
-object. If the passed object is of class Nri
, By default, all Nri-indices (if the passed object is of class Nri
) or all bands (if the passed object is of class Speclib
) are used as predictors.
1 2 | ## S4 method for signature '.CaretHyperspectral,character'
setPredictor(x, predictor)
|
x |
Object of one of the following classes: \Sexpr[echo=TRUE,results=rd]{ paste(hsdar:::.getCaretCompatibleClasses(), collapse = ", ") }. |
predictor |
Character vector. Name of additional predictor variable(s) (from the SI). |
The updated object.
Lukas Lehnert
showCaretParameters
, setResponse
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data(spectral_data)
## Set "season" as additional predictor variable from the SI
spectral_data <- setPredictor(spectral_data, "season")
## Show caret related parameters stored in the Speclib
showCaretParameters(spectral_data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.