Skater
Skater copied to clipboard
TypeError: 'NoneType' object is not subscriptable - A problem with the n_samples parameter in plot_feature_importance
I have come across an error in the plot_feature_importance method, relating to the n_samples parameter. When the parameter is set lower than the size of the test set (or train set if the Interpretation object is based on that), the TypeError: 'NoneType' object is not subscriptable, occurs. As long as the n_samples parameter is set higher than the size of the relevant dataset, everything works fine.
The code in the attached pdf was run in a Google Colab environment, with python 3.6 and skater 1.1.2. I followed the example from your documentation: https://github.com/oracle/Skater/blob/master/examples/explaining_classification_breast_cancer.ipynb
When applying a much larger dataset than the one in the example, the problem is more critical, as plotting feature importance with a large sample size takes a very long time.