标签:import ssi 导入 form targe ext rac target div
导入sklearn.feature_extraction.text.TfidfVectorizer用于转换字符串 from sklearn.feature_extraction.text import TfidfVectorizer # 创建对象 tf = TfidfVectorizer() # 训练 tf.fit(data) # transform 转化 data_result = tf.transform(data).toarray() ga_NB = GaussianNB() ga_NB.fit(data_result, target)
标签:import ssi 导入 form targe ext rac target div
原文地址:https://www.cnblogs.com/gugubeng/p/9803458.html