Learn R Programming

sits (version 1.5.3-1)

sits_train: Train classification models

Description

Given a tibble with a set of time series, returns trained models. Currently, sits supports the following models:

  • support vector machines: sits_svm;

  • random forests: sits_rfor;

  • extreme gradient boosting: sits_xgboost;

  • light gradient boosting: sits_lightgbm;

  • multi-layer perceptrons: sits_mlp;

  • temporal CNN: sits_tempcnn;

  • residual network encoders: sits_resnet;

  • LSTM with convolutional networks: sits_lstm_fcn;

  • temporal self-attention encoders: sits_lighttae and sits_tae.

Usage

sits_train(samples, ml_method = sits_svm())

Value

Model fitted to input data to be passed to sits_classify

Arguments

samples

Time series with the training samples.

ml_method

Machine learning method.

Author

Rolf Simoes, rolfsimoes@gmail.com

Gilberto Camara, gilberto.camara@inpe.br

Alexandre Ywata de Carvalho, alexandre.ywata@ipea.gov.br

Examples

Run this code
if (sits_run_examples()) {
    # Retrieve the set of samples for Mato Grosso
    # fit a training model (rfor model)
    ml_model <- sits_train(samples_modis_ndvi, sits_rfor(num_trees = 50))
    # get a point and classify the point with the ml_model
    point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
    class <- sits_classify(
        data = point_ndvi, ml_model = ml_model
    )
}

Run the code above in your browser using DataLab