mattharrison / effective_xgboost_book

262 stars 25 forks source link

class_names need to be a list not a numpy.ndarray #11

Open saljamil opened 10 months ago

saljamil commented 10 months ago

Page 27 of the book - had to change the code to this: fig, ax = plt.subplots(figsize=(8, 4)) tree.plot_tree(stump, feature_names=['value'], filled=True, classnames=list(stump.classes), ax=ax)

with class_names param needing a list