Learn R Programming

FrechForest (version 0.8.1)

pred.FT: Frechet Tree prediction

Description

Given a Frechet tree and new input trajectories predictors X, this function returns the identifier of the leaf in which each observation falls.

Usage

pred.FT(tree, X, time, id, timeScale = 0.1)

Arguments

tree

: Frechet tree obtained with the function FrechTree.

X

[matrix]: a data frame or a matrix of trajectories predictors.

time

[vector]: time measurements of the new trajectories to predict.

id

[vector]: identifier, one for each trajectory to attribute each measurement of X to one of the trajectories.

timeScale

[numeric]: allow to modify the time scale, increasing or decreasing the cost of the horizontal shift. If timeScale is very big, then the Frechet mean tends to the Euclidean distance. If timeScale is very small, then it tends to the Dynamic Time Warping.

Value

a vector of the identifier of the leaf in which each observation falls.