caret::setResponse | R Documentation |
Set response variable to be used in model-fitting functions of package caret. The response variable must be set upon any model training using a hsdar-object in caret.
## S4 method for signature '.CaretHyperspectral,character' setResponse(x, response)
x |
Object of one of the following classes: \Sexpr[echo=TRUE,results=rd]{ paste(hsdar:::.getCaretCompatibleClasses(), collapse = ", ") }. |
response |
Character. Name of response variable (from the SI). |
The updated object.
Lukas Lehnert
showCaretParameters
, setPredictor
## Not run: data(spectral_data) ## Set response variable (Chlorophyll content) spectral_data <- setResponse(spectral_data, "chlorophyll") ## 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.