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

fig 9.12; fig_rrlyrae_treevis.py and sklearn.tree.DecisionTreeClassifier #78

Closed
richardgmcmahon opened this issue Oct 7, 2015 · 2 comments

Comments

@richardgmcmahon
Copy link

I am using:

sklearn.version: 0.16.1
astroML.version: 0.3

File "fig_rrlyrae_treevis.py", line 242, in
random_state=0, criterion='entropy')
TypeError: init() got an unexpected keyword argument 'compute_importances'

I added these lines to fix my fork:

# in 0.14+ Setting compute_importances=True is no longer required. 
try:
  # version < 0.14
 clf = DecisionTreeClassifier(compute_importances=True,
                             random_state=0, criterion='entropy')
except:
  # version 0.14+
  clf = DecisionTreeClassifier(
                             random_state=0, criterion='entropy')

see also: #77

@jakevdp
Copy link
Member

jakevdp commented Jan 20, 2016

Thanks – there have been a number of changes to the scikit-learn API in the last year or so. I plan to update those in the next release.

@bsipocz
Copy link
Member

bsipocz commented Sep 10, 2018

Issue has been moved to the other repo.

@bsipocz bsipocz closed this as completed Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants