[英]What is the 'n_components' parameter for tweetopic.dmm.DMM class?
I am working on a project topic modeling tweets using the tweetopic Python library.我正在使用 tweetopic Python 库对项目主题建模推文。 I want to understand what the parameter "n_components" for the tweetopic.dmm.DMM class is.我想了解 tweetopic.dmm.DMM class 的参数“n_components”是什么。 I see in the documentation it's described as the "Number of mixture components in the model."我在文档中看到它被描述为“model 中混合物成分的数量”。 I'm new to topic modeling, so am not quite sure what that means.我是主题建模的新手,所以不太确定这意味着什么。
Thank you!谢谢!
Here is my code:这是我的代码:
tweetopic.dmm.DMM(n_components=10, n_iterations=100, alpha: float = 0.1, beta: float = 0.1) tweetopic.dmm.DMM(n_components=10, n_iterations=100, alpha: float = 0.1, beta: float = 0.1)
Tweetopic is like any other sklearn-compatible topic model. In all of sklearn's topic models you specify the number of topics with n_components
. Tweetopic 与任何其他 sklearn 兼容的主题 model 一样。在所有 sklearn 的主题模型中,您使用n_components
指定主题的数量。
I might change the documentation so that this gets clearer.我可能会更改文档,以便更清楚地说明这一点。 It says mixture components, because DMM is a mixture-model, meaning that it assumes that all texts come from a mixture of distributions, and each distribution (component) can be thought of as a topic.它说混合成分,因为DMM是一个混合模型,意味着它假设所有文本都来自分布的混合,并且每个分布(成分)都可以被认为是一个主题。 I hope I could be of help:)我希望我能有所帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.