quantlab.model.training_target.TrainingTargetMixin#
- class quantlab.model.training_target.TrainingTargetMixin[source]#
Bases:
objectThe
_transform_targethook and the per-bar target computation of both variants.Mixed into
TorchModelandLibraryModelahead ofBaseModel; it reads the model’sclass_name,to_arrayand 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_targetand, for aLibraryModel, sets notraining_target. A head that overrides the hook (a rank, a z-score), or a library head with atraining_target, is"standardized"for every label, since the one transform applies to all of them.Examples
>>> model.label_scales {'fwd_ret_1': 'raw'}