if (sits_run_examples()) {
# Example of training a model for time series classification
# Retrieve the samples for Mato Grosso
# train a random forest model
rf_model <- sits_train(samples_modis_ndvi,
ml_method = sits_rfor
)
# classify the point
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# classify the point
point_class <- sits_classify(
data = point_ndvi, ml_model = rf_model
)
plot(point_class)
}
Run the code above in your browser using DataLab