Builds a Frechet tree that is selected with cross validation
TreeShapeCV(X, Y, id, time, ...)[matrix]: a data frame or a matrix of trajectories predictors. Each colunm codes for a trajectory predictor.
[vector]: a vector containing the output trajectories (same length as nrow(X)).
[vector (factor)]: identifier, one for each trajectory to attribute each measurement of X and Y to one of the trajectories (same length as Y).
[vector]: time measurements for the observations of both X and Y (same length as Y).
: optional parameters to be passed to the low level function