Salve Naive Bayes Classificador Treinado no NLTK
Estou um pouco confuso em relação a como eu salvo um classificador treinado. Como em, re-treinar um classificador toda vez que eu quiser usá-lo é obviamente muito ruim e lento, como salvá-lo e carregá-lo novamente quando eu precisar dele? Código está abaixo, obrigado antecipadamente por sua ajuda. Estou usando o Python com o NLTK Naive Bayes Classifier.
classifier = nltk.NaiveBayesClassifier.train(training_set)
# look inside the classifier train method in the source code of the NLTK library
def train(labeled_featuresets, estimator=nltk.probability.ELEProbDist):
# Create the P(label) distribution
label_probdist = estimator(label_freqdist)
# Create the P(fval|label, fname) distribution
feature_probdist = {}
return NaiveBayesClassifier(label_probdist, feature_probdist)