-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to explain prediction for a data with just a few features (from all features of training dataset)? #731
Comments
You can run the LIME Explainer on select few columns/features too. // write logic to select the features that you want to run LIME Explainer on // Create a LimeTabularExplainer // select instance to explain // Display the explanation The above method works for explaining the predictions when you want to have selective features. But if you want to generate predictions, your testing data (x_test) has to have the same features as the training data (x_train) in the ML model, or else it'll throw error of features not being the same. |
@apoplexi24 Thank you for your kind reply!! It worked! By the way, I have also changed the code of predict function, setting the 'predict_disable_shape_check' parameter to true: def predict_fn_binary(x): |
I have generated lightGBM models for prediction. I can explain the predictions with all features by filling user input data with NAs. Is there any way to explain prediction for the original user input data without filling it?
The text was updated successfully, but these errors were encountered: