Comments (4)
Hello,
I did quartiles just because it was quick and easy to implement. I've also had it happen to me that most point lie in one quartile, so that the discretization is not so good.
Whether or not we want to discretize is a question that I've been pondering for a while. Anyway, to answer your question: if we are discretizing, I think smarter discretization methods would probably be helpful.
from lime.
Hi Marco,
I've implemented a entropy based discretizer, using scikit entropy decision trees, here: https://github.com/marcbllv/lime if ever you have time and would like to try it.
The discretizers are in a separated file, with an abstract class & children classes where specific binnings are implemented. I mostly used your code for the base class. The labels now needs to be passed to the explainer to use supervized binning, but not passing them is ok if keeping the QuartileDiscretizer (default None), so it should keep compatibility.
I've tested it on classification (not regression yet) and it seems to give nice results as it explores more the extreme values than with the quartiles.
I don't know if this needs to be integrated in your own repo ? I mostly did it for testing purposes on my side but if you're interested let me know :-)
from lime.
I like how you've used the Decision Tree to do the discretization. I think it would perhaps make more sense if the discretization did not depend on the labels, but only on the data itself.
Anyway, I'm a bit slammed for the next few weeks, but as soon as I have some time I will try out your discretization. If it seems to make more sense for a few datasets, we should merge it in LIME. If you have particular examples where the quartile discretizer is bad and the entropy one is good, send them to me : ).
Thanks,
from lime.
@mrkaiser included this in a recent pull request, so closing this issue.
from lime.
Related Issues (20)
- Can LIME only be used for text classification tasks?
- How to explain prediction for a data with just a few features (from all features of training dataset)? HOT 2
- Trying to explaine a simple Neural Network using LIME HOT 1
- submodular pick
- ans = self.domain_mapper.map_exp_ids(self.local_exp[label_to_use], **kwargs) KeyError: 1
- Getting error when my predict_fn is actually a method from a class HOT 1
- `show_in_notebook` shows no bars
- importance score for all tokens
- Unexpected keyword argument 'progress_bar' for lime_image.LimeImageExplainer().explain_instance()
- Issues with LIME Implementation in Image Classification
- How to use lime with 3 dim time series data and lstm
- Distances derivation, explain_instance() method in Tabular LIME
- How to handle binary features
- RecurrentTabularExplainer for regression task
- Question: using LIME for text generation HOT 1
- LIME and multi-correlated variables
- update Python support
- Inverse scaling/ normalization to get actual unscaled values in explanation : Old issue but I made a way around
- Met the issue about TypeError when using lime_image.LimeImageExplainer()
- Saving the output of show_in_notebook as static image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lime.