1.根据训练集语料库,计算出tfidf值 2.计算出测试语句每个词语的tfidf值(只有当测试语句的词语在训练语料库的dictionary中,测试语句的词语才会计算tfidf值) import jieba from gensim import corpora, similarities, model ...
分类:
其他好文 时间:
2020-05-23 16:30:17
阅读次数:
106
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-23 14:55:16
阅读次数:
45
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-23 11:42:54
阅读次数:
62
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-23 09:42:28
阅读次数:
42
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-23 00:36:52
阅读次数:
72
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-22 21:42:20
阅读次数:
75
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-22 12:46:48
阅读次数:
55
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-21 09:55:55
阅读次数:
60
一些评估方法 1.留出法 它将数据集D划分为两个互斥的集合,其中一个集合作为训练集S,S的补集作为测试集T。在S上训练出模型后,用T来评估其测试误差,作为对泛化的估计。 2.交叉验证法 将数据集划分为k个大小相似的互斥子集,D=D1 U D2 U...Dk,每个子集都尽可能保持分布一致性。每次选择k ...
分类:
其他好文 时间:
2020-05-18 23:06:57
阅读次数:
152
1.1为什么选择序列模型 (1)序列模型广泛应用于语音识别,音乐生成,情感分析,DNA序列分析,机器翻译,视频行为识别,命名实体识别等众多领域。 (2)上面那些问题可以看成使用(x,y)作为训练集的监督学习,但是输入与输出的对应关系有非常多的组合,比如一对一,多对多,一对多,多对一,多对多(个数不同 ...
分类:
其他好文 时间:
2020-05-17 10:33:22
阅读次数:
124