Skater icon indicating copy to clipboard operation
Skater copied to clipboard

plot_feature_importance got stuck

Open mattivi opened this issue 5 years ago • 5 comments

I am running the plot_feature_importance in a jupyter notebook (python 3.6, skater-1.1.2) but it got stuck without providing any error. Code is the following

interpreter = Interpretation(training_data=X_train_XAI, feature_names=data.drop(columns=col_emb).columns)
im_model = InMemoryModel(predict_AE_XAI_API, examples=X_real_XAI)
plots = interpreter.feature_importance.plot_feature_importance(im_model, ascending=True, n_samples=20000, use_scaling=True, n_jobs=10)

the interpreter.feature_importance.plot_feature_importance is running endlessly, without consuming CPU resources. How to debug it and find why it get stuck? Or any clue why this behaviour? Many thanks!

mattivi avatar Mar 19 '19 14:03 mattivi

Hey Hi, Do you have any solutions for this? I have the same problem :S

marcayda avatar Apr 10 '19 11:04 marcayda

No. It works only if I reduce the number of samples to 15000, so in my case X_real_XAI has a dimension of (15000,7). However, that's not the purpose of explainability as I need to evaluate for all rows in the original dataset, that in my case are much higher.

mattivi avatar Apr 10 '19 11:04 mattivi

Any more hint how to solve this problem?

mattivi avatar Apr 16 '19 14:04 mattivi

I installed Skater with Conda and I don't have this problem anymore, but I can't use de feature n_samples, I see the next message in console TypeError: plot_feature_importance() got an unexpected keyword argument 'n_samples', I don't use de Jpyter Editor, maybe is for this reason the error message.

In this link is the description of the install with Conda

https://oracle.github.io/Skater/install.html

marcayda avatar Apr 16 '19 19:04 marcayda

I got the same problem and I sovled it with specifying n_job (n_job=1). I guess this issue is related to multiprocessing.

bonogom avatar Nov 05 '19 23:11 bonogom