DiCE
DiCE copied to clipboard
Support for scikit-learn and other libraries where models are not necessarily differentiable
Hi, Thanks a lot for the wonderful library. As you guys have mentioned in the roadmap, can you tell us by when we can expect the integration of scikit-learn like libraries. I am facing issues when using trying to integrate the same. Thanks in advance!
yes, integrating scikit-learn is a high-priority feature and we are working on it. Should have an update in the next few weeks.
Hi, thanks for a cool and important library. Can you please tell whether LightGBM will be supported after a new updates?
Hi @arsine1996, we are currently trying to make it work for scikit-learn models. We will update the readme if we can extend it to XGBoost and LightGBM as well.
@raam93 I'm also interested in using LightGBM, XGBoost etc. I found currently DiCE supports 'scikit-learn' model DiCE_model_agnostic_CFs.ipynb. Does it also support LightGBM scikit-learn API ?
@konabuta DiCE supports any ML model that respects the scikit-learn API for predict
and predict_proba
. So if your model has these two functions, you can use it with the "sklearn" backend. I think LightGBM uses an API that is compatible with scikit-learn, so I think it should work.
Just use the backend="sklearn" and input the lightgbm model. It may work with XGBoost too.
For any model, you can have a look at this file: https://github.com/interpretml/DiCE/blob/master/dice_ml/model_interfaces/base_model.py
As long as your model has a predict
and predict_proba
function, it should work directly.