can i store LIME results to a table instead of show_in_notebook or save_to_file?

132 views Asked by At

I have got the results of LimeTabularExplainer

but I got them in html format

like this

enter image description here

I only want the weight of each feature to be in a table or dataframe that i can store in a database later

Here is the code that I use

I wonder if there is a method I can extract the weights in a dataframe?

explainer = LimeTabularExplainer(X_train.values, feature_names=X_train.columns, verbose=True, mode='classification')
i = 0  # index of the instance to be explained
exp = explainer.explain_instance(X_test.values[i], clf.predict_proba, num_features=100)
exp.show_in_notebook(show_table=True)
exp.save_to_file("LIME.html")
0

There are 0 answers