2013/7/30 Wifi Gi <[email protected]>: > If people aren't really tired of my spamming the mailing list yet...
No problem, supporting users and getting feedback is one of the primary goals of this ML. However the mailing list archives are not very googlable hence we tend to push users to ask questions on stackoverflow with the [scikit-learn] tag so as to better "recycle" the answers to the most common questions. But feel free to use which modality you prefer. > I am trying to use the cross_val_score() function, return the accuracies, > and then save the model to disk for later use/testing. However, the models > that are written to disk are not trained models - they are just bare > instances of the classifier's class. I discovered this when I tried to save > a graph of the decision tree and the model had no tree, but the same thing > occurs with Gaussian Bayes, Bernoulli Bayes, and k-Nearest Neighbors as well > as the Decision Tree. > > Is there a way to get the trained classifier that I'm missing? Without the > ability to save the classifier, this becomes a pretty useless function. If you do k-fold cross validation, you train k independent models that are all independent clones of the input model, not just one. Right now the intermediate models are thrown away. You can write your own cross validation utility if you need to store intermediate state like the models or the individual predictions for instance: The code is quite simple to adapt for your own needs: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cross_validation.py#L1132 -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
