Learn R Programming

sits (version 0.13.1)

sits_ranger: 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_ranger(data = NULL, num_trees = 200, importance = "impurity", ...)

Arguments

data

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).

importance

Variable importance mode, one of 'none', 'impurity', 'impurity_corrected', 'permutation'. The 'impurity' measure is the Gini index.

...

Other ranger parameters

Value

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

Examples

Run this code
# NOT RUN {
# Retrieve the set of samples for Mato Grosso  (provided by EMBRAPA)
samples_ndvi <- sits_select(samples_mt_6bands, bands = c("NDVI"))

# Build a machine learning model
ml_model <- sits_train(samples_ndvi, sits_ranger(num_trees = 100))

# get a point and classify the point with the ml_model
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
class <- sits_classify(point_ndvi, ml_model)

# }

Run the code above in your browser using DataLab