Created
January 16, 2022 15:06
-
-
Save varrek/16cd432be820ee10df835710fcdd0770 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import eli5 | |
| from eli5.lime import TextExplainer | |
| target_names = train["targetcat"].unique().tolist() | |
| te = TextExplainer(random_state=42) | |
| te.fit(valid.description.iloc[10], logreg.predict_proba) | |
| te.show_prediction(target_names=target_names) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment