找回密码
 注册
查看: 240|回复: 0

R语言 SamplerCompare包 compare.samplers()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 21:32:29 | 显示全部楼层 |阅读模式
compare.samplers(SamplerCompare)
compare.samplers()所属R语言包:SamplerCompare

                                        Compare MCMC samplers on distributions
                                         MCMC采样分布比较

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Simulate a set of distributions with a set of samplers
模拟的一组分布的一组取样


用法----------Usage----------


                 trace=TRUE, seed=17, burn.in=0.2,



参数----------Arguments----------

参数:sample.size
An integer specifying how long a chain to simulate.
一个整数,指定多长时间链来模拟。


参数:dists
A list of dist objects (often generated by make.dist) specifying the probability distributions to simulate.
列表dist对象(通常是所产生的make.dist)指定的概率分布来模拟。


参数:samplers
A list of sampler functions.  See the section “Sampler calling convention”.
采样功能列表。请参阅“取样器的调用约定”。


参数:tuning
A numeric vector of tuning parameters
一个数值向量的整定参数


参数:trace
A logical indicating whether a message should be printed when a chain completes (useful for large simulations).
一个逻辑指示是否应印有消息链完成后,(用于大型模拟)。


参数:seed
If not null, the random seed is set to this with set.seed before each chain and restored afterwards. This makes each chain individually replicable, useful when debugging.
如果不为null,设置随机种子与set.seed这之前,每个链和恢复之后。这使得每个链单独复制,在调试时非常有用。


参数:burn.in
Fraction of chain to discard before computing autocorrelation time.
链,放弃之前计算自相关时间的比例。


参数:cores
Number of threads to use.
要使用的线程数。


参数:completed.file
If not NULL, the name of a file to log partial results to.
如果不是NULL,一个文件的名称,登录的部分结果。


Details

详细信息----------Details----------

compare.samplers runs a single Markov chain simulation of length sampler.size size for each combination of the elements of dists, samplers, and tuning. Each chain starts at a point generated by the initial member of the distribution object, or a point uniformly drawn from the unit hypercube if initial is not defined.  It returns a data frame with one row per simulation so that performance of the methods can be compared on the various distributions.  The simplest way to visualize the results is with the comparison.plot function.
compare.samplers运行一个单一的模拟马尔可夫链的长度sampler.size尺寸的每一种组合的元素dists,samplers,和tuning。每个链开始于一个点由initial的分发对象的部件,或均匀来自单位超立方体如果initial还没有定义的点生成。它返回一个数据框,每行模拟的方法,使性能能够比较各种发行版。最简单的方法来可视化的结果是comparison.plot功能。

As the simulations are run, they are logged to a file in the format generated by save.  If <VAR>completed.file</VAR> is set, that file is used and retained after the function returns. If it is not, a temporary file is used and deleted on successful completion.  (It may be leaked if the simulations are aborted.) If <VAR>trace</VAR> is set, the filename will be output so that the output can be inspected incrementally.
由于模拟运行时,它们将被记录到一个文件中的格式产生的save。如果<VAR> completed.file </ VAR>设置,该文件被使用并保留在函数返回后。如果不是这样,一个临时文件删除成功完成。 (这可能被泄露,如果模拟被中止。)如果<VAR>跟踪</ VAR>设置,文件名会被输出,使输出可以逐步进行检查。

If <VAR>cores</VAR> is greater than one, the multicore and synchronicity packages are used to run multiple simulations simultaneously.  These packages are not available for Windows. There is currently a bug such that if a simulation calls error, R will not print the error message, just a message indicating that timing stopped.  The simulation can be re-run with cores=1 to see the error.
如果<VAR>芯线</ VAR>比1,multicore和synchronicity包,同时运行多个模拟。这些包不是可用于Windows。目前有一个错误,例如,如果一个模拟的呼叫error,R将不打印错误消息,只是一个消息,表明时间停止。仿真可以重新运行cores=1看错误。

For an example of the use of this method, see the &ldquo;Introduction to SamplerCompare&rdquo; vignette.  For discussion of the ideas behind it, see Thompson (2010).
举一个例子,使用这种方法,请参阅“简介SamplerCompare”小插曲“。它背后的想法的讨论,请参阅汤普森(2010年)。


值----------Value----------

A data frame with columns dist, dist.expr, ndim, sampler, sampler.expr, tuning, act, act.025, act.975, act.y, act.y.025, act.y.975, evals, grads, cpu, err, and aborted.  Each row represents a single simulation.
一个数据框的列dist,dist.expr,ndim,sampler,sampler.expr,tuning,act,<X >,act.025,act.975,act.y,act.y.025,act.y.975,evals,grads,cpu和err。每一行代表一个单一的模拟。

sampler and dist are the names of the sampler and distribution taken from the lists passed to compare.samplers.
sampler和dist是从列表中采取的取样和分配的名称传递给compare.samplers。

sampler.expr and dist.expr are plotmath versions of sampler and dist. If not specified by the distribution object and sampler function, they are constructed from dist and sampler.
sampler.expr和dist.expr是plotmath版本的sampler和dist。如果未指定分配对象和采样功能,它们的构造dist和sampler。

ndim is the dimension of the state space of the target distribution.
ndim是目标分配的状态空间的尺寸。

tuning is the tuning parameter for the chain.
tuning链的优化参数。

act is the estimated autocorrelation time, taken over all parameters of the simulation; see ar.act. This is more accurate if target.dist$mean is defined.
act是估计自相关时间,接管所有的模拟参数; ar.act。 target.dist$mean如果定义,这是更准确的。

act.025 and act.975 bound a nominal 95% confidence interval for act.  Since the interval is asymmetric, a standard error is not sufficient.
act.025和act.975绑定了一个95%的置信区间act。由于间隔是不对称的,标准误差是不够的。

act.y, act.y.025, and act.y.975 are an estimate and endpoints for a nominal 95% confidence interval for the autocorrelation time of the log density.  These are more accurate if target.dist$mean.log.dens is defined.
act.y,act.y.025和act.y.975是象征性的95%置信区间为自相关时间的记录密度的估计和终点。这些都是target.dist$mean.log.dens更准确的定义。

evals and grads are the mean log-density and gradient evaluations per observation.
evals和grads是平均每次观测的记录密度,梯度评价。

cpu is the number of processor seconds used per observation.
cpu是多少秒,每次观测的处理器。

err is the two-norm of the difference between the estimated mean and the true mean.  Set to NA if the distribution does not specify a true mean.
err是估计的平均值之间的差异和真实平均值的2  - 范数。设置为NA的分布,如果不指定一个真正的意思。

aborted is a logical indicating whether the simulation returned fewer rows than requested.
aborted是否模拟返回的行数少,比要求的是一个逻辑。


采样器的调用约定----------Sampler calling convention----------

Sampler functions passed to compare.samplers should be of the form:
采样功能传递给compare.samplers应该是这样的形式:


参考文献----------References----------

University of Toronto Dept. of Statistics technical report no. 1010.
Journal of Statistical Software 43(12):1-10.

参见----------See Also----------

make.dist, comparison.plot, ar.act, &ldquo;Introduction to SamplerCompare&rdquo; (vignette)
make.dist,comparison.plot,ar.act,的“介绍SamplerCompare”(小插曲)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-29 05:48 , Processed in 0.024682 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表