Skip to content

Quantus evaluation for Lime #265

Discussion options

You must be logged in to vote

Hi @Akshatha122

Regarding setting the Lime attributes, such as feature_mask, you can extend the dictionary in the explain_func_kwargs dictionary as follows:

explain_func_kwargs = {"xai_lib": "captum", "method": "Lime", "xai_lib_kwargs": {"feature_mask": feature_mask.to(device).long()}}
results = evaluate_xai_methods(model, ...., s_batch, nr_samples=1, explain_func_kwargs=explain_func_kwargs)

Read more in our official documentation: https://quantus.readthedocs.io/en/latest/docs_api/quantus.functions.explanation_func.html#quantus.functions.explanation_func.explain

LIME hyperparams: https://captum.ai/api/lime.html

I hope this helps. Let me know if you have any further questions!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Akshatha-Mohan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants