| train {GPS} | R Documentation |
train(gps,
checkpoint = NULL);
Training runs in two stages: the masked reconstruction pre-training stage, in which the last time frame of a random subset of genes is masked, followed by the next-step prediction fine-tuning stage, which uses the autofocus loss plus the direction aware loss. The best validation parameters are restored when early stopping triggers.
The evaluation metrics are computed on the time ordered test windows, and the "persistence" baseline (the last observed frame is used as the prediction) is reported side by side, so the contribution of the graph and the attention can be judged. When the model has not surpassed that baseline yet, an explanatory note is appended to the report; increasing finetune_epochs usually helps.
The returned object carries four attributes: training (GPSTrainingResult with the loss curves), metrics (EvaluationMetrics of the model), baseline (EvaluationMetrics of the persistence baseline) and report (the formatted multi line text).
the trained model object with the training, metrics, baseline and report attributes attached; an R# error object is returned instead when the training fails or when the produced loss curve is not finite.