caret_sfb: Methods for Function 'sbf'

caret::sbfR Documentation

Methods for Function sbf

Description

Methods for function sbf in package caret. Please refer to help pages in the caret-package for further information.

Usage

## S4 method for signature 'Speclib'
sbf(x, y, cutoff = 0.95, returnData = TRUE, ...)

## S4 method for signature 'Nri'
sbf(x, y, cutoff = 0.95, returnData = TRUE, ...)

## S4 method for signature 'Specfeat'
sbf(x, y, cutoff = 0.95, returnData = TRUE, ...)

get_sbf(sbf_obj)

Arguments

x

Object of class Speclib, Nri or Specfeat.

y

A numeric or factor vector containing the outcome for each sample. If missing, the response variable set by setResponse is used.

cutoff

The cutoff value of the correlation coefficients between response variables.

returnData

Logical. If TRUE, the updated object of x is returned, otherwise only the result of sbf is returned.

...

Further aruments passed to sbf.

sbf_obj

Object of class Speclib, Nri or Specfeat as output of sbf-function.

Value

If returnData == TRUE, an object of class Speclib or Nri, otherwise an object of class sbf. Note that if x is an object of class Specfeat, the function returns an object of class Speclib containing the relevant transformed band values.

Author(s)

Lukas Lehnert

See Also

sbf

Examples

## 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")

## Selection by filtering
## Note that this may take some time!
sbf_res <- sbf(spectral_data)

get_sbf(sbf_res)

plot(get_sbf(sbf_res))

## End(Not run)

hsdar documentation built on March 18, 2022, 6:35 p.m.