View source: R/sits_machine_learning.R
sits_svm | R Documentation |
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.
sits_svm(
samples = NULL,
formula = sits_formula_linear(),
scale = FALSE,
cachesize = 1000,
kernel = "radial",
degree = 3,
coef0 = 0,
cost = 10,
tolerance = 0.001,
epsilon = 0.1,
cross = 10,
...
)
samples |
Time series with the training samples. |
formula |
Symbolic description of the model to be fit. (default: sits_formula_linear). |
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. |
Model fitted to input data
(to be passed to sits_classify
)
Please refer to the sits documentation available in <https://e-sensing.github.io/sitsbook/> for detailed examples.
Alexandre Ywata de Carvalho, alexandre.ywata@ipea.gov.br
Rolf Simoes, rolf.simoes@inpe.br
Gilberto Camara, gilberto.camara@inpe.br
if (sits_run_examples()) {
# Example of training a model for time series classification
# Retrieve the samples for Mato Grosso
# train an SVM model
ml_model <- sits_train(samples_modis_ndvi, ml_method = sits_svm)
# classify the point
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# classify the point
point_class <- sits_classify(
data = point_ndvi, ml_model = ml_model
)
plot(point_class)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.