Fix. Correct the wrong words in the sentence

pull/2/head
benjas 5 years ago
parent 1dbab5ebf0
commit fad9fc00cb

@ -206,7 +206,7 @@ Multi-Head架构图如下
- 方法1句子中有15%的词汇被随机mask掉 - 方法1句子中有15%的词汇被随机mask掉
- 较给模型去预测被mask的是什么 - 较给模型去预测被mask的是什么
- 词语的可能性太多了,中文一般是 - 词语的可能性太多了,中文一般是
- 如果BERT训练的向量好那分类自然好 - 如果BERT训练的向量好那分类自然好
![1609751713233](assets/1609751713233.png) ![1609751713233](assets/1609751713233.png)

@ -599,7 +599,7 @@
"random_normal_indices=np.random.choice(normal_indices, number_records_fraud,replace=False) \n", "random_normal_indices=np.random.choice(normal_indices, number_records_fraud,replace=False) \n",
"random_normal_indices=np.array(random_normal_indices)\n", "random_normal_indices=np.array(random_normal_indices)\n",
"\n", "\n",
"# 有了正常样本和异常样本的所以\n", "# 有了正常样本和异常样本的索引\n",
"under_sample_indices=np.concatenate([fraud_indices,random_normal_indices])\n", "under_sample_indices=np.concatenate([fraud_indices,random_normal_indices])\n",
"\n", "\n",
"# 根据索引得到下采样的所有样本点\n", "# 根据索引得到下采样的所有样本点\n",

@ -599,7 +599,7 @@
"random_normal_indices=np.random.choice(normal_indices, number_records_fraud,replace=False) \n", "random_normal_indices=np.random.choice(normal_indices, number_records_fraud,replace=False) \n",
"random_normal_indices=np.array(random_normal_indices)\n", "random_normal_indices=np.array(random_normal_indices)\n",
"\n", "\n",
"# 有了正常样本和异常样本的所以\n", "# 有了正常样本和异常样本的索引\n",
"under_sample_indices=np.concatenate([fraud_indices,random_normal_indices])\n", "under_sample_indices=np.concatenate([fraud_indices,random_normal_indices])\n",
"\n", "\n",
"# 根据索引得到下采样的所有样本点\n", "# 根据索引得到下采样的所有样本点\n",

@ -1528,7 +1528,7 @@
"source": [ "source": [
"cm_w2v = confusion_matrix(y_test_word2vec, y_predicted_word2vec)\n", "cm_w2v = confusion_matrix(y_test_word2vec, y_predicted_word2vec)\n",
"fig = plt.figure(figsize=(10, 10))\n", "fig = plt.figure(figsize=(10, 10))\n",
"plot = plot_confusion_matrix(cm, classes=['Irrelevant','Disaster','Unsure'], normalize=False, title='Confusion matrix')\n", "plot = plot_confusion_matrix(cm_w2v, classes=['Irrelevant','Disaster','Unsure'], normalize=False, title='Confusion matrix')\n",
"plt.show()\n", "plt.show()\n",
"print(\"Word2Vec confusion matrix\")\n", "print(\"Word2Vec confusion matrix\")\n",
"print(cm_w2v)\n", "print(cm_w2v)\n",

Loading…
Cancel
Save