View source: R/sits_classify.R
| sits_classify | R Documentation |
This function classifies a set of time series or data cube using
a trained model prediction model created by sits_train.
The sits_classify function takes three types of data as input
and produce there types of output. Users should call
sits_classify but be aware that the parameters
are different for each type of input.
sits_classify.sits is called when the input is
a set of time series. The output is the same set
with the additional column predicted.
sits_classify.raster_cube is called when the
input is a regular raster data cube. The output is a probability cube,
which has the same tiles as the raster cube. Each tile contains
a multiband image; each band contains the probability that
each pixel belongs to a given class.
Probability cubes are objects of class "probs_cube".
sits_classify.vector_cube is called for
vector data cubes. Vector data cubes are produced when
closed regions are obtained from raster data cubes using
sits_segment. Classification of a vector
data cube produces a vector data structure with additional
columns expressing the class probabilities for each object.
Probability cubes for vector data cubes
are objects of class "probs_vector_cube".
sits_classify(data, ml_model, ...)
## S3 method for class 'tbl_df'
sits_classify(data, ml_model, ...)
## S3 method for class 'derived_cube'
sits_classify(data, ml_model, ...)
## Default S3 method:
sits_classify(data, ml_model, ...)
data |
Data cube (tibble of class "raster_cube") |
ml_model |
R model trained by |
... |
Other parameters for specific functions. |
Time series with predicted labels for each point (tibble of class "sits") or a data cube with probabilities for each class (tibble of class "probs_cube").
The main sits classification workflow has the following steps:
sits_cube: selects a ARD image collection from
a cloud provider.
sits_cube_copy: copies an ARD image collection
from a cloud provider to a local directory for faster processing.
sits_regularize: create a regular data cube
from an ARD image collection.
sits_apply: create new indices by combining
bands of a regular data cube (optional).
sits_get_data: extract time series
from a regular data cube based on user-provided labelled samples.
sits_train: train a machine learning
model based on image time series.
sits_classify: classify a data cube
using a machine learning model and obtain a probability cube.
sits_smooth: post-process a probability cube
using a spatial smoother to remove outliers and
increase spatial consistency.
sits_label_classification: produce a
classified map by selecting the label with the highest probability
from a smoothed cube.
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.
Please refer to the sits documentation available in https://e-sensing.github.io/sitsbook/ for detailed examples.
Rolf Simoes, rolfsimoes@gmail.com
Gilberto Camara, gilberto.camara@inpe.br
Felipe Carvalho, lipecaso@gmail.com
Felipe Carlos, efelipecarlos@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.