I just upgraded scikit from 14.1 to 15.1 to take advantage of the speed 
improvements in the random forest classifier. However, when I tried loading the 
model created (using 14.1), it fails to load it. Here is the error. Please 
advice. I’m simply loading it as follows. Thanks a lot.

Code:

    with open(model_file, 'r') as fmodel:
        rf = pickle.load(fmodel)

Error:

  File "/home/pranav/links/projects/generator/generator/apply_ml_model.py", 
line 184, in recommend_links
    rf = pickle.load(fmodel)
  File "/usr/local/lib/python2.7/pickle.py", line 1378, in load
    return Unpickler(file).load()
  File "/usr/local/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/local/lib/python2.7/pickle.py", line 1133, in load_reduce
    value = func(*args)
  File "_tree.pyx", line 2217, in sklearn.tree._tree.Tree.__cinit__ 
(sklearn/tree/_tree.c:17530)
TypeError: __cinit__() takes exactly 3 positional arguments (8 given)

Regards,
Pranav.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to