首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CBOW与跳格词向量的区别

CBOW与跳格词向量的区别
EN

Data Science用户
提问于 2020-10-12 19:24:56
回答 2查看 474关注 0票数 1

我经历过几个链接,但不能够理解CBOW and Skip Gram是如何从零开始训练的?

任何好的链接/博客或书籍都会很有帮助。

Word2Vec - CBOW和Skip-克

Skipgram word2vecCBOW word2vec在训练中的区别是什么,以及什么时候使用CBOW .?

Example or Application where CBOW would be preferable choice but not Skip-gram and vice versa.

EN

回答 2

Data Science用户

发布于 2020-10-12 23:10:31

下面是@Christos Karatsalos是描述的一个例子:

如果你用“猫跳过水坑”这样的说法,

CBOW's的例子中,神经网络的单词嵌入是通过向神经网络传递一个输入set of words并使该网络预测输出word来训练的,如下所示:

\{ cat, jumped, over, the, puddle\} \rightarrow The
\{ The, jumped, over, the, puddle\} \rightarrow cat
\{ The, cat, over, the, puddle\} \rightarrow jumped
\{ cat, jumped, the, puddle\} \rightarrow over
\{ The, cat, jumped, over, puddle\} \rightarrow the
\{ The, cat, jumped, over, the\} \rightarrow puddle

skip-gram's的例子中,神经网络的单词嵌入是通过向神经网络传递一个输入word来训练的,并教该网络预测一个set of words,如下所示:

The \rightarrow \{ cat, jumped, over, the, puddle\}
cat \rightarrow \{ The, jumped, over, the, puddle\}
jumped \rightarrow \{ The, cat, over, the, puddle\}
over \rightarrow \{ cat, jumped, the, puddle\}
the \rightarrow \{ The, cat, jumped, over, puddle\}
puddle \rightarrow \{ The, cat, jumped, over, the\}

在用法上,如果你在考虑填充空白类的问题,CBOW Word2Vec将是一个合适的向量,另一方面,如果你有一个单词,并且你试图想出一个新的句子,那么skip-gram Word2Vec将是有用的。

想了解更多信息,请看这个讲座备注

票数 2
EN

Data Science用户

发布于 2020-10-12 22:04:38

CBOW模型能够学习通过上下文来预测单词,这意味着它试图通过查看上下文来最大化目标词的概率。另一方面,Skip模型被设计用来预测给定单词的上下文.

跳过图模型在训练数据较少的情况下运行良好,而且能很好地代表甚至是罕见的单词或短语。

CBOW模型训练速度比Skip模型快几倍,对频繁词的训练精度略高。

票数 1
EN
页面原文内容由Data Science提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://datascience.stackexchange.com/questions/82922

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档