Train and test a ZeitZeiger predictorSource:
Train and test a ZeitZeiger predictor, calling the necessary functions.
zeitzeiger( xTrain, timeTrain, xTest, nKnots = 3, nTime = 10, useSpc = TRUE, sumabsv = 2, orth = TRUE, nSpc = 2, 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.
Number of internal knots to use for the periodic smoothing spline.
Number of time-points by which to discretize the time-dependent behavior of each feature. Corresponds to the number of rows in the matri for which the SPCs will be calculated.
L1-constraint on the SPCs, passed to
Logical indicating whether to require left singular vectors be orthogonal to each other, passed to
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.