Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saljamil opened this issue Sep 3, 2023 · 0 comments
Open

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

saljamil opened this issue Sep 3, 2023 · 0 comments

Comments

@saljamil
Copy link

saljamil commented Sep 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant