compounded.sampler(SamplerCompare)
compounded.sampler()所属R语言包:SamplerCompare
Build a sampler from transition functions
从转变职能构建一个采样
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Defines a probability distribution object for use with
定义的概率分布为使用对象
用法----------Usage----------
compounded.sampler(step.functions, name, name.expr=NULL)
参数----------Arguments----------
参数:step.functions
A list of transition functions; see details.
转移函数的列表,查看详细信息。
参数:name
A character string naming the sampler.
一个字符串,命名采样。
参数:name.expr
A character string naming the sampler in plotmath notation.
一个字符串,命名plotmath符号的采样。
Details
详细信息----------Details----------
compounded.sampler builds an MCMC sampler following the conventions of compare.samplers from a list of transition functions. The returned sampler has four arguments: <VAR>target.dist</VAR>, <VAR>x0</VAR>, <VAR>sample.size</VAR>, and <VAR>limit</VAR>. Further arguments, including the standard argument <VAR>tuning</VAR>, are passed to every transition function. The first three arguments transition functions are passed are <VAR>target.dist</VAR>, a vector state <VAR>x</VAR> to transition from, and the log density at that state, <VAR>y</VAR>. They should return a list containing four elements: <VAR>x</VAR>, <VAR>y</VAR>, <VAR>evals</VAR>, and <VAR>grads</VAR>. <VAR>x</VAR> is the state transitioned to, <VAR>y</VAR> is the log density at that state, and <VAR>evals</VAR> and <VAR>grads</VAR> are the number of log density and gradient calls made in that transition.
compounded.sampler建立MCMC采样compare.samplers从列表中转移函数的公约。返回的取样器有四个参数:<VAR> target.dist </ VAR>,<VAR> X0 </ VAR>,<VAR> sample.size </ VAR>,并<VAR>的限制</ VAR>。更多的参数,包括标准的参数对应的调整</ VAR>,传递给每一个过渡功能。前三个参数的转换函数传递对应的target.dist </ VAR>,矢量状态<VAR> X </ VAR>的过渡,并在该状态的log密度,对应的Y </ VAR >。他们应该返回一个列表,其中包含四个要素:<VAR> X </ VAR>,对应的Y </ VAR>,对应的评估版</ VAR>,和<VAR>毕业生</ VAR>。 <VAR> X </ VAR是状态转换到对应的Y </ VAR>是在该状态下的记录密度,<VAR>评估版</ VAR>和<VAR>毕业生</ VAR>是在这一变化过程中的记录密度和梯度呼叫数。
Each MCMC iteration, the first transition function is called with the current state of the chain. The state it returns is passed to the second transition function, whose returned state is passed to the third, and so on. The state returned by the final transition function is taken to be the state of the chain as a whole at the end of the iteration.
每个MCMC迭代过程中,第一过渡函数被调用时的当前状态的链。它返回的状态传递给第二个转换函数,其返回的状态传递给第三个,依此类推。由最后的过渡函数返回的状态取为作为一个整体在迭代结束的状态的链。
This way, transition functions that provide complementary features, such as fast mixing in different coordinates, can be combined without modifying their internal structure. The transition_fn interface provides a similar mechanism for samplers implemented in C. It is documented in the vignette, “R/C Glue in SamplerCompare”.
通过这种方式,提供互补的特点,如快速混合在不同的坐标系的转换函数,可以组合,而无需修改其内部结构。 transition_fn接口提供了一个类似的机制,用C实现的采样记录中的小插曲,“R / C胶在SamplerCompare”。
值----------Value----------
A sampler function.
一个取样器功能。
参见----------See Also----------
compare.samplers
compare.samplers
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|