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

运行出错 #1

Open
wqw547243068 opened this issue Sep 25, 2017 · 0 comments
Open

运行出错 #1

wqw547243068 opened this issue Sep 25, 2017 · 0 comments

Comments

@wqw547243068
Copy link

加载决策树pkl模型出错,是不是对sklearn版本有要求?

Traceback (most recent call last):
File "myPredict.py", line 8, in
clf = joblib.load(root+'model/my_face_rating.pkl')
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 573, in load
return load_compatibility(fobj)
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle_compat.py", line 226, in load_compatibility
obj = unpickler.load()
File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 864, in load
dispatchkey
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle_compat.py", line 177, in load_build
Unpickler.load_build(self)
File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1223, in load_build
setstate(state)
File "sklearn/tree/_tree.pyx", line 632, in sklearn.tree._tree.Tree.setstate (sklearn/tree/_tree.c:8128)
KeyError: 'max_depth'

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