quantlab.model.evaluation.Segments#
- class quantlab.model.evaluation.Segments(train, val, test)[source]#
Bases:
objectThe bars of a unit’s train, validation and test segments.
Each field is an array of timestamps, empty when the unit has no such segment; a model’s come from its purged split of the training window and its test dates.
Examples
>>> segments = Segments(train=stamps[:20], val=stamps[:0], test=stamps[25:]) >>> [split for split, _ in segments.splits()] ['train', 'test']