R: Train support vector machine models

sits_svm {sits} | R Documentation

## Train support vector machine models

### Description

This function receives a tibble with a set of attributes X for each observation Y. These attributes are the values of the time series for each band. The SVM algorithm is used for multiclass-classification. For this purpose, it uses the "one-against-one" approach, in which k(k-1)/2 binary classifiers are trained; the appropriate class is found by a voting scheme. This function is a front-end to the "svm" method in the "e1071" package. Please refer to the documentation in that package for more details.

### Usage

    sits_svm(
      data = NULL,
      formula = sits_formula_logref(),
      scale = FALSE,
      cachesize = 1000,
      kernel = "radial",
      degree = 3,
      coef0 = 0,
      cost = 10,
      tolerance = 0.001,
      epsilon = 0.1,
      cross = 10,
      ...
    )

### Arguments

`data` | Time series with the training samples.
`formula` | Symbolic description of the model to be fit. (default: sits_formula_logref).
`scale` | Logical vector indicating the variables to be scaled.
`cachesize` | Cache memory in MB (default = 1000).
`kernel` | Kernel used in training and predicting. options: "linear", "polynomial", "radial", "sigmoid" (default: "radial").
`degree` | Exponential of polynomial type kernel (default: 3).
`coef0` | Parameter needed for kernels of type polynomial and sigmoid (default: 0).
`cost` | Cost of constraints violation (default: 10.
`tolerance` | Tolerance of termination criterion (default: 0.001).
`epsilon` | Epsilon in the insensitive-loss function (default: 0.1).
`cross` | Number of cross validation folds applied to assess the quality of the model (default: 10).
`...` | Other parameters to be passed to e1071::svm function.

### Value

Model fitted to input data (to be passed to `sits_classify`)

### Author(s)

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

Rolf Simoes, rolf.simoes@inpe.br

Gilberto Camara, gilberto.camara@inpe.br

### Examples

    ## Not run:
    # Retrieve the set of samples for  Mato Grosso  (provided by EMBRAPA)
    samples_2bands <- sits_select(samples_modis_4bands, bands = c("NDVI", "EVI"))

    # Build a machine learning model
    ml_model <- sits_train(samples_2bands, sits_svm())

    # get a point and classify the point with the ml_model
    point.tb <- sits_select(point_mt_6bands, bands = c("NDVI", "EVI"))
    class.tb <- sits_classify(point.tb, ml_model)
    plot(class.tb, bands = c("NDVI", "EVI"))

    ## End(Not run)

[Package sits version 0.16.2 Index]