perplexity(topicmodels)
perplexity()所属R语言包:topicmodels
Methods for Function perplexity
功能困惑的方法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Determine the perplexity of a fitted model.
确定一个合适的模型的困惑。
用法----------Usage----------
perplexity(object, newdata, ...)
## S4 method for signature 'VEM,simple_triplet_matrix'
perplexity(object, newdata, control, ...)
## S4 method for signature 'Gibbs,simple_triplet_matrix'
perplexity(object, newdata, control, use_theta = TRUE,
estimate_theta = TRUE, ...)
## S4 method for signature 'Gibbs_list,simple_triplet_matrix'
perplexity(object, newdata, control, use_theta = TRUE,
estimate_theta = TRUE, ...)
参数----------Arguments----------
参数:object
Object of class "TopicModel" or "Gibbs_list".
对象类"TopicModel"或"Gibbs_list"。
参数:newdata
If missing, the perplexity for the data to which the model was fitted is determined. For objects fitted using Gibbs sampling newdata needs to be specified.
如果缺少,确定的数据,模型拟合的困惑。对于安装使用Gibbs抽样newdata需要指定的对象。
参数:control
If missing, the control of the fitted model is used with suitable changes of the relevant parameters (see Details).
如果没有,control的拟合模型是使用合适的相关参数的变化(见详情)。
参数:use_theta
Object of class "logical". If TRUE the estimated topic distributions for the documents are used. Otherwise equal weights are assigned to the topics for each document.
对象类"logical"。如果TRUE主题分布估计使用的文件。否则相同的权重分配给对每个文档的主题。
参数:estimate_theta
Object of class "logical". If FALSE the data provided is assumed to be the same as the data used for fitting the model. The topic distributions therefore do not need to be estimated and the data in newdata is used for weighting the term-document occurrences.
对象类"logical"。如果FALSE提供的数据被假定为用于拟合模型的相同的数据。的主题分布,因此不需要进行估计并在newdata的数据是用于加权的术语文档发生。
参数:...
Further arguments passed to the different methods.
进一步的参数传递方式的不同。
Details
详细信息----------Details----------
The specified control is modified to ensure that (1) estimate.beta=FALSE and (2) nstart=1.
指定控件修改,以确保:(1)estimate.beta=FALSE(2)nstart=1的。
For "Gibbs_list" objects the control is further modified to have (1) iter=thin and (2) best=TRUE and the model is fitted to the new data with this control for each available iteration. The perplexity is then determined by averaging over the same number of iterations.
对于"Gibbs_list"对象control被进一步修改,有(1)iter=thin和(2)best=TRUE和模型装配到新的数据与此控制为每个可用迭代。然后判定平均过的迭代次数相同的困惑。
If a list is supplied as object, it is assumed that it consists of several models which were fitted using different starting configurations.
如果一个list提供object,它假定它是由几种型号使用不同的配置安装。
值----------Value----------
A numeric value.
一个数值。
(作者)----------Author(s)----------
Bettina Gruen
参考文献----------References----------
Latent Dirichlet Allocation. Journal of Machine Learning Research, 3, 993–1022.
Finding Scientific Topics. Proceedings of the National Academy of Sciences of the United States of America, 101, Suppl. 1, 5228–5235.
Distributed Algorithms for Topic Models. Journal of Machine Learning Research, 10, 1801–1828.
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|