Classes extending lcModel
can override this method to adapt the computation of the predicted values for the training data.
Note that the implementation of this function is only needed when predict()
and predictForCluster()
are not defined for the lcModel
subclass.
fitted.lcModelExt <- function(object, ..., clusters = trajectoryAssignments(object)) {
pred = predict(object, newdata = NULL)
transformFitted(pred = pred, model = object, clusters = clusters)
}
The transformFitted()
function takes care of transforming the prediction input to the right output format.