Weighted ensemble caruana
Implementation of the weighted ensemble procedure from Caruana et al. 2004.
Reference
Ensemble selection from libraries of models
Rich Caruana, Alexandru Niculescu-Mizil, Geoff Crew and Alex Ksikes
ICML 2004
dl.acm.org/doi/10.1145/1015330.1015432
www.cs.cornell.edu/~caruana/ctp/ct.papers/caruana.icml04.icdm06long.pdf
def weighted_ensemble_caruana(*, model_predictions, targets, size, metric, select, seed=None)
#
Calculate a weighted ensemble of n
models.
PARAMETER | DESCRIPTION |
---|---|
model_predictions |
Mapping from model id to predictions |
targets |
The targets
TYPE:
|
size |
The size of the ensemble to create
TYPE:
|
metric |
The metric to use in calculating which models to add to the ensemble. |
select |
Selects a models from the list based on the values of the metric on their predictions. Can return a single ID or a list of them, in which case a random selection will be made. |
seed |
The seed to use for breaking ties
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tuple[dict[K, float], list[tuple[K, T]], ndarray]
|
A mapping from id's to it's weight in the ensemble and the trajectory. |