Predict corresponding time for groups of test observationsSource:
Predict the value of the periodic variable for each group of test observations, where the amount of time between each observation in a group is known.
zeitzeigerPredictGroup( xTrain, timeTrain, xTest, groupTest, spcResult, nKnots = 3, nSpc = NA, timeRange = seq(0, 1 - 0.01, 0.01) )
Matrix of measurements for training data, observations in rows and features in columns.
Vector of values of the periodic variable for training observations, where 0 corresponds to the lowest possible value and 1 corresponds to the highest possible value.
Matrix of measurements for test data, observations in rows and features in columns.
data.frame with one row per observation in
xTest, and columns for
timeDiff. Observations in the same group should have the same value of
group. Within each group, the value of
timeDiffshould correspond to the amount of time between that observation and a reference time. Typically,
timeDiffwill equal zero for one observation per group.
Number of internal knots to use for the periodic smoothing spline.
Vector of the number of SPCs to use for prediction. If
Kis the number of SPCs in
spcResult. Each value in
nSpcwill correspond to one prediction for each test observation. A value of 2 means that the prediction will be based on the first 2 SPCs.
Vector of values of the periodic variable at which to calculate likelihood. The time with the highest likelihood is used as the initial value for the MLE optimizer.
A list with the following elements, where the groups will be sorted by their names.
3-D array of likelihood, with dimensions for each group of test observations, each element of
nSpc, and each element of
List (for each element in
nSpc) of lists (for each group of test observations) of
Matrix of predicted times for each group of test observations by values of