yamle.trainers.ensemble module#
- class yamle.trainers.ensemble.BaggingTrainer(*args, **kwargs)[source]#
Bases:
BaseTrainerThis class defines a bagging trainer which given a method and multiple data splits performs training and evaluation.
The difference is that the data is split across training splits and the training is performed in parallel for each training split.
- class yamle.trainers.ensemble.EnsembleTrainer(parallel=False, *args, **kwargs)[source]#
Bases:
BaggingTrainerThis class defines an ensemble trainer which given a method and data loaders performs training and evaluation.
The difference is that the training is performed repeatedly for all ensemble members. If training data splits are provided, the training is performed with respect to the data splits which are separate for each ensemble member.
If the training is defines as parallel, this trainer returns multiple train loaders to the method. Then it is the method’s responsibility to train the ensemble members in parallel.
- Parameters:
parallel¶ (bool) – Whether to train the ensemble members in parallel.