Learn R Programming

sits (version 1.12.0)

sits_distances: Use time series values from a sits tibble as distances for training patterns

Description

This function allows using a set of labelled time series as input to the machine learning models. The attributes used to train the model are the series themselves. This function extracts the time series from a sits tibble and "spreads" them in time to produce a tibble with distances. It needs an additional value that adjusts the values of the time series to meet the criteria of machine learning methods, since most ML methods do not allow for negative data.

Usage

sits_distances(data.tb)

Arguments

data.tb

A tibble with time series data and metadata.

Value

A data.table where columns have the reference label and the time series values as distances.

Examples

Run this code
# NOT RUN {
# Retrieve the set of samples for the Cerrado and Pasture classes
data(cerrado_2classes)
# estimate distances from the data
distances <- sits_distances(cerrado_2classes)
# }

Run the code above in your browser using DataLab