Learn R Programming

sits (version 1.12.0)

sits_mlr: Train a sits classifiaction model using multinomial log-linear regions via neural networks

Description

Use multinomial log-linear (mlr) fitting model via neural networks to classify data. These attributes are distance metrics between patterns and observations, obtained by a distance function in sits (see sits_distances). This function is a front-end to the "multinom" method in the "nnet" package. Please refer to the documentation in that package for more details.

Usage

sits_mlr(data.tb = NULL, formula = sits_formula_linear(),
  n_weights = 20000, maxit = 2000, ...)

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).

n_weights

Maximum number of weights (should be proportional to size of input data).

maxit

Maximum number of iterations (default 300).

...

Other parameters to be passed to nnet::multinom 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 an MLR model
mlr_model <- sits_train(samples_mt_ndvi, sits_mlr())
# get a point with a 16 year time series
data(point_ndvi)
# classify the point
class.tb <- sits_classify (point_ndvi, mlr_model)
# plot the classification
sits_plot(class.tb)
# }

Run the code above in your browser using DataLab