Python, Programming, Data Science, Artificial Intelligence, Machine Learning.
LimeTextExplainer(class_names=['Negative', 'Positive']) # Select an instance to explain instance = X_test # Generate the LIME explanation exp = explainer.explain_instance(instance, lr_classifier.predict_proba, num_features=10) # Visualize the LIME explanation exp.show_in_notebook(text=instance)