Ship it!
Let's assume we want to integrate this classifier into our site. What we definitely do not want is to train the classifier each time we start the classification service. Instead, we can simply serialize the classifier after training and then deserialize it on that site:
>>> import pickle >>> pickle.dump(clf, open("logreg.dat", "w")) >>> clf = pickle.load(open("logreg.dat", "r"))
Congratulations, the classifier is now ready to be used as if it had just been trained.