def fit(self, dataset, filename):
self.logger.debug("fit")
self.clf = Pipeline([('vect', CountVectorizer()),
('tfidf', TfidfTransformer()),
('clf', MultinomialNB())
])
self.clf.fit(dataset.get_dataset()['data'], dataset.get_dataset()['target'])
joblib.dump(self.clf, filename + ".pkl", compress=9)
classifier_bayesian.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录