marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.64k stars 1.81k forks source link

Configuring with cosine_similarity and tf_idf #653

Open sksoumik opened 2 years ago

sksoumik commented 2 years ago

I am using some product descriptions to generate a content-based recommender system where I am using TF_IDF for generating vectors for descriptions and then calculating the similarity using cosine_similarity. Based on it, it's recommending products. Now, I have seen the LIME doc and a few tutorials on how LIME can be configured for text classifiers in this section. But I can't understand how I can configure LIME for my mentioned use case to see which words are affecting most in my recommender system. Is it even possible to do it using LIME? For your convenience, here is a sample notebook of my recommender system.