effective_xgboost_book icon indicating copy to clipboard operation
effective_xgboost_book copied to clipboard

class_names need to be a list not a numpy.ndarray

Open saljamil opened this issue 1 year ago • 0 comments

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, class_names=list(stump.classes_), ax=ax)

with class_names param needing a list

saljamil avatar Sep 03 '23 01:09 saljamil