Why does averaging many models help? The error-ambiguity decomposition gives an exact answer for regression: the averaged ensemble's error equals the models' average error minus how much the models disagree with each other. Disagreement is only useful when the models are still individually accurate.
Implement ambiguity_decomposition(predictions, target) for a simple-average ensemble of regressors, returning the ensemble error, the mean individual error and the ambiguity. Errors are mean squared errors.
predictions has shape (n_models, n_samples); target has shape (n_samples,).(ensemble_error, mean_individual_error, ambiguity).Open one at a time. Each gives away a little more than the last.
Ensemble error is the squared error of the averaged prediction. Mean individual error averages the squared error over models and samples.
Ambiguity is the average squared distance between each model's prediction and the ensemble's prediction, again over models and samples.
No results yet
Run your code to check it against the examples, or submit to run every test.