lda有监督
by Vikash Singh
由Vikash Singh
我们的创业公司如何从无监督LDA转换为半监督GuidedLDA (How our startup switched from Unsupervised LDA to Semi-Supervised GuidedLDA)
This is the story of how and why we had to write our own form of Latent Dirichlet Allocation (LDA). I also talk about why we needed to build a Guided Topic Model (GuidedLDA), and the process of open sourcing everything on GitHub.
这是关于我们如何以及为什么必须编写自己的潜在狄利克雷分配 (LDA)形式的故事。 我还讨论了为什么我们需要构建引导主题模型(GuidedLDA),以及在GitHub上开源所有内容的过程。
什么是LDA(主题建模)? (What Is LDA (Topic Modeling)?)
Lets say that you have a set of News Articles which were documents. By reading those articles you will be able to tell if they are about Sports, Politics or Science.
假设您有一组新闻文章,它们是文档。 通过阅读这些文章,您可以判断它们是否涉及体育,政治或科学。
For the following titles you will agree that 1 and 5 are about Politics, 2 and 4 about Sports, and 3 and 6 about Science:
对于以下标题,您将同意1和5与政治有关,2和4与体育有关,3和6与科学有关:
For a human being it’s not a challenge to figure out which topic a news article belongs to. But how can we teach a computer to understand the same topics?
对于一个人来说,弄清新闻属于哪个主题并不是一个挑战。 但是,我们如何教计算机理解相同的主题?
This is where topic modeling comes into picture. Topic modeling is an unsupervised class of machine learning Algorithms. These models are generally good at grouping words together into topics. LDA is the most popular topic modeling technique.
这就是主题建模的场景。 主题建模是机器学习算法的无监督类。 这些模型通常擅长将单词组合成主题。 LDA是最流行的主题建模技术。
Once we have the words grouped into topics, we can now see which group of words the news articles and document talks about. Then we can classify it into that group or topic.
将单词分为主题之后,我们现在可以看到新闻文章和文档谈论的单词。 然后,我们可以将其分类为该组或主题。
As we can see, this new News Article talks about Nobel Prize. We can now predict that this document talks about Science topic.
如我们所见,这篇新的新闻文章谈到了诺贝尔奖 。 现在,我们可以预测该文档将讨论“ 科学”主题。
Note: Words are not grouped directly into topics. Rather a probability is calculated such as “What is the probability of a word belonging to a topic?”.
注意 :单词不会直接分为主题。 而是计算概率,例如“单词属于主题的概率是多少?”。
It’s given by p(t|w). Or probability of topic t given word w. At it’s core it’s just Bayesian_probability.
由p(t | w)给出。 或主题t给定单词w的概率。 它的核心只是Bayesian_probability 。
I would love to talk more about it, but don’t want to deviate from the core problem. If you are interested, you can read more about it