MashiMaroLjc / dudulu

APIs of text mining

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about gnb.model

zhouxinmin opened this issue · comments

Could you tell me how to generate the gnb.model file ?

Here is how the model saved:

from sklearn.externals import joblib

feature, label = get_feature("train.txt", kw_list)
gnb = GaussianNB()
gnb = gnb.fit(feature, label)
joblib.dump(gnb, 'model/gnb.model')

oh,thank you!