I learned how XGBoost multi-class classification works.
Turns out that every n_classes tree (read estimator) is for that particular class. Neat way of keeping boosted regression tree leafs restricted to one value.
This commit adds support for XGBoost multi-class classification model transformations.
XGBoost handles multiclass classification by having n_classes * n_estimators trees.
Then, every n_classes tree corresponds to their respective classes
Since Elasticsearch supports multi-valued leaves, we can transform the xgboost format by choosing the
appropriate leaf value index given the tree id.
This commit also fixes a minor model transformation bug where if xgboost actually defined the feature_names instead of the default f1,...fn we would blow up.
I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
I learned how XGBoost multi-class classification works.
Turns out that every
n_classes
tree (read estimator) is for that particular class. Neat way of keeping boosted regression tree leafs restricted to one value.[ML] add multi:softmax|softprob XGBoost support #246
This commit adds support for XGBoost multi-class classification model transformations.
XGBoost handles multiclass classification by having
n_classes * n_estimators
trees. Then, everyn_classes
tree corresponds to their respective classesSince Elasticsearch supports multi-valued leaves, we can transform the xgboost format by choosing the appropriate leaf value index given the tree id.
This commit also fixes a minor model transformation bug where if xgboost actually defined the feature_names instead of the default
f1,...fn
we would blow up.closes github.com/elastic/eland/issues/242