train {GPS} R Documentation

Train the GPS model and return it together with the training diagnostics.

Description

Usage

train(gps,
    checkpoint = NULL);

Arguments

gps

the untrained model created by gps::build_gps. [as GPSModel]

env

the R# runtime environment used to report errors. [as Environment]

Details

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).

Authors

biosystem

Value

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.

clr value class

Examples


[Package GPS version 1.0.0.0 Index]