quantlab.model.training_target.TrainingTargetMixin#

class quantlab.model.training_target.TrainingTargetMixin[source]#

Bases: object

The _transform_target hook and the per-bar target computation of both variants.

Mixed into TorchModel and LibraryModel ahead of BaseModel; it reads the model’s class_name, to_array and factor and label names.

property label_scales#

Each label name’s prediction scale: "raw" or "standardized".

"raw" exactly when the model is fitted on the labels themselves and predicts in their units: the head keeps the default, identity _transform_target and, for a LibraryModel, sets no training_target. A head that overrides the hook (a rank, a z-score), or a library head with a training_target, is "standardized" for every label, since the one transform applies to all of them.

Examples

>>> model.label_scales
{'fwd_ret_1': 'raw'}