Learn R Programming

sits (version 1.12.0)

sits_rfor: Train a sits classifiction model using fast random forest algorithm

Description

Use Fast Random Forest algorithm to classify data. This function is a front-end to the "ranger" method in the "ranger" package. Please refer to the documentation in that package for more details.

Usage

sits_rfor(data.tb = NULL, num.trees = 2000, ...)

Arguments

data.tb

Time series with the training samples.

num.trees

Number of trees to grow. This should not be set to too small a number, to ensure that every input row gets predicted at least a few times. (default: 2000).

...

Other parameters to be passed to ranger function.

Value

Either a model function to be passed in sits_predict or an function prepared that can be called further to compute multinom training model.

Examples

Run this code
# NOT RUN {
# Retrieve the set of samples for the Mato Grosso region (provided by EMBRAPA)
data(samples_mt_ndvi)
# Build a random forest model
rfor_model <- sits_train(samples_mt_ndvi, sits_rfor())
# get a point with a 16 year time series
data(point_ndvi)
# classify the point
class.tb <- sits_classify (point_ndvi, rfor_model)
# plot the classification
sits_plot(class.tb)
# }

Run the code above in your browser using DataLab