0

I am working on implementing XGBoost on the Titanic dataset provided by Kaggle. I found the package ELI5 and the tutorial for implementing this package with XGBoost on the Titanic dataset at this link on the official documentation for ELI 5 (Jupyter Notebook tutorial). While on the third section of the notebook, I attempt to apply the show_weights() function to my classifier, but I get the following error after running these lines of code.

[1]from eli5 import show_weights, explain_weights
[2]show_weights(clf, vec=vec)

Out[2]: TypeError: 'NoneType' object is not iterable

Clearly it's not interpreting the clf object created in section 2. There's no information of the ELI5 package being incompatible with XGBoost in either packages' documentation.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
TheFrator
  • 15
  • 3

1 Answers1

4

I can reproduce that same error when using ELI5 with XGBoost 1.4.0.

However, with XGBoost version 1.3.0 and earlier versions the error goes away.

Downgrade if you can.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jortizta
  • 49
  • 5
  • While not ideal, this solution did work for me. As of 27 OCT 2021, ELI5's GitHub has an open issue about this problem: https://github.com/TeamHG-Memex/eli5/pull/407. If you're likewise running into this problem, I suggest that you go and up-vote the issue! – matteblack Oct 27 '21 at 16:15