Learn R Programming

sits (version 1.12.0)

sits_qda: Train a sits classification model using quadratic discriminant analysis

Description

This function receives a tibble with a set of attributes X for each observation Y These attributes are distance metrics between patterns and observations, obtained by a distance function in sits (see sits_distances). The function performs a quadratic discriminant analysis (qda) to obtain a predictive model. This function is a front-end to the "qda" method in the "MASS" package. Please refer to the documentation in that package for more details.

Usage

sits_qda(data.tb = NULL, formula = sits_formula_logref(), ...)

Arguments

data.tb

Time series with the training samples.

formula

Symbolic description of the model to be fit. Package sits offers a set of such formulas (default: sits_formula_logref).

...

Other parameters to be passed to MASS::qda function.

Value

A model function to be passed in sits_predict.

Examples

Run this code
# NOT RUN {
# Retrieve the set of samples for the Mato Grosso region (provided by EMBRAPA)
data(samples_mt_ndvi)
# Build a QDA model
qda_model <- sits_train(samples_mt_ndvi, sits_qda())
# get a point with a 16 year time series
data(point_ndvi)
# classify the point
class.tb <- sits_classify (point_ndvi, qda_model)
# plot the classification
sits_plot(class.tb)
# }

Run the code above in your browser using DataLab