TeamHG-Memex / eli5

A library for debugging/inspecting machine learning classifiers and explaining their predictions
http://eli5.readthedocs.io
MIT License
2.74k stars 332 forks source link

Support for CatBoost? #276

Open lextoumbourou opened 5 years ago

lextoumbourou commented 5 years ago

Hi there,

I'd love to see support for CatBoost in eli5. It has a Scikit-style API like XGBoost and LightGBM, so should be a lot of code we can copy and paste from those implementations.

I might have a dig into it myself, if no one else is already looking at it.

❤️

AshwinB-hat commented 5 years ago

Hey, I would like to take up this issue if no one is on it! It will be my first issue fyi.

lopuhin commented 5 years ago

Nice! Adding explain_weights support would be a good start here 👍

AshwinB-hat commented 5 years ago

Yes, Sounds like a good milestone to start with! I will get started on it.

AshwinB-hat commented 5 years ago

I have raised a PR for `explain_weights' #303

ivanprado commented 5 years ago

@AshwinB-hat added support for explain_weights (Thanks! :-) ) but I'll leave this issue open as still integration for explain_prediction is missing.

Stuart-D-King commented 5 years ago

@ivanprado @AshwinB-hat Sorry, but I can't seem to get this to work. Here's some code:

expl = eli5.explain_weights(cb_model) print(eli5.format_as_text(expl))

Error: estimator <catboost.core.CatBoostClassifier object at 0x13b579400> is not supported

Can someone tell me what I'm doing wrong? Thanks.

lopuhin commented 5 years ago

@Stuart-D-King this code is in master but not released yet, it should work if you install eli5 from github (something like pip install https://github.com/TeamHG-Memex/eli5/archive/master.zip).

Stuart-D-King commented 5 years ago

@lopuhin Ahhh, thanks so much!

lopuhin commented 4 years ago

eli5.explain_weights support for catboost released as part of 0.9.0, thanks @AshwinB-hat for implementation and @ivanprado for review!