Hi Paul.
Doing the documentation is in the issue tracker, but no-one wrote it yet :-/
The unpickled model should be trained, i.e. it is not necessary to
re-run fit.
Running fit again will just forget the old model.
Hth,
Andy
On 01/04/2013 05:19 PM, [email protected] wrote:
Dear SciKitters,
there is one thing I don't understand when cPickling a model. Here is
my code to pickle a model:
"
clf_kNN = KNeighborsClassifier()
clf_kNN = clf_kNN.fit(dataDescrs_array,dataActs_array)
cPickle.dump(clf_kNN,file("clf_kNN.descr.pk","wb+"))
"
And this is the way to extract the model:
"
kNN_clf_frompkl = cPickle.load(file("./clf_kNN.descr.pkl","rb"))
y_predict = kNN_clf_frompkl.predict(X_test)
#
kNN_clf_frompkl = kNN_clf_frompkl.fit(X_train,y_train)
y_predict2 = kNN_clf_frompkl.predict(X_test)
"
Is it necessary to run the "fit" step? - in my understanding,
"kNN_clf_frompkl" already contains a kNN model.
What is the difference between the loaded models with and without the
"fit" step?
Is there any documentation about cPickling models? The only
documentation I found comes from the mailing list.
Cheers & Thanks,
Paul
This message and any attachment are confidential and may be privileged
or otherwise protected from disclosure. If you are not the intended
recipient, you must not copy this message or attachment or disclose
the contents to any other person. If you have received this
transmission in error, please notify the sender immediately and delete
the message and any attachment from your system. Merck KGaA,
Darmstadt, Germany and any of its subsidiaries do not accept liability
for any omissions or errors in this message which may arise as a
result of E-Mail-transmission or for damages resulting from any
unauthorized changes of the content of this message and any attachment
thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do
not guarantee that this message is free of viruses and does not accept
liability for any damages caused by any virus transmitted therewith.
Click _http://www.merckgroup.com/disclaimer_to access the German,
French, Spanish and Portuguese versions of this disclaimer.
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general