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

eli5 with CalibratedClassifierCV from sklearn.calibration #371

Open skocbek opened 4 years ago

skocbek commented 4 years ago

Hi,

I am trying to use eli5 with CalibratedClassifierCV from sklearn. This classifier is not supported by default within eli5, could you please let me know where to proceed to add support and what is needed.

Many thanks!

teabolt commented 4 years ago

Hi @skocbek,

To add support for a new sklearn class you need to register the type of the class with singledispatch. For example see: https://github.com/TeamHG-Memex/eli5/blob/017c738f8dcf3e31346de49a390835ffafad3f1b/eli5/sklearn/explain_weights.py#L181 You might need to write a new "explain" function.

Another option is to use a black-box method (https://eli5.readthedocs.io/en/latest/blackbox/index.html).

Regards, Tomas