3. Training on costs#
These models take the cost matrix into training, so they optimise business value directly instead of being scored on it afterwards. Each one mirrors a familiar scikit-learn estimator with a cost-sensitive objective.
All of them accept costs the same two ways — plain tp_cost/tn_cost/fp_cost/fn_cost
values, or a Metric passed as loss — described once in
Handing costs to an estimator, and all of them route per-row costs through pipelines the same way, in
Costs that differ per row. The pages below cover only what differs between them.
Not sure which to pick? Which tool do I need? has a decision table; in short, Cost-Sensitive Gradient Boosting (CSBoost & B2Boost) is the strongest default, Linear Cost-Sensitive Models is the interpretable choice, and Tree-Based Cost-Sensitive Models sits in between.
Cost-sensitive logistic regression: the interpretable choice, with a coefficient per feature you can read.
XGBoost, LightGBM and CatBoost trained on your cost matrix. The strongest default.
Trees, forests and ProfTree, which split on business value rather than on impurity.
Models that optimise the worst case over an uncertain class prior, and symbolic alternatives.
A meta-estimator rather than a model: wraps a cost-sensitive model to guard it against outliers in noisy cost estimates.