Ensembler¶
- class daart.models.base.Ensembler(models)[source]¶
Bases:
objectEnsemble of models.
Methods Summary
predict_labels(data_generator[, ...])Combine class predictions from multiple models by averaging before softmax.
Methods Documentation
- predict_labels(data_generator, combine_before_softmax=False, weights=None)[source]¶
Combine class predictions from multiple models by averaging before softmax.
- Parameters:
data_generator (DataGenerator object) – data generator to serve data batches
combine_before_softmax (bool, optional) – True to combine logits across models before taking softmax; False to take softmax for each model then combine probabilities
weights (array-like, str, or NoneType, optional) – array-like: weight for each model str: ‘entropy’: weight each model at each time point by inverse entropy of distribution None: uniform weight for each model
- Returns:
‘labels’ (list of lists): corresponding labels
- Return type:
dict