Revenue based scoring in `GridSearchCV`: a case for the new metadata routing in scikit-learn

Talk 25 min

Adrin Jalali
Passing metadata such as `sample_weight` and `groups` through a scikit-learn `cross_validate`, `GridSearchCV`, or a `Pipeline` to the right estimators, scorers, and CV splitters has been either cumbersome, hacky, or impossible. The new metadata routing mechanism in scikit-learn enables you to pass metadata through these objects. As a use-case, we study how you can implement a revenue sensitive scoring while doing a hyperparameter search within a `GridSearchCV` object.