这个交叉验证问题要求模拟一个以固定金额为条件的样本,使我想起了乔治•卡塞拉(George Casella)提出的一个问题。
对于一个给定的值,有以模拟IID样品一个通用的方法上的MLE的值有条件?θ(X 1,... ,X Ñ)
例如,采用分布,位置参数为,密度为如果我们如何以条件来模拟?在此示例中,没有封闭形式的表达式。
这个交叉验证问题要求模拟一个以固定金额为条件的样本,使我想起了乔治•卡塞拉(George Casella)提出的一个问题。
对于一个给定的值,有以模拟IID样品一个通用的方法上的MLE的值有条件?θ(X 1,... ,X Ñ)
例如,采用分布,位置参数为,密度为如果我们如何以条件来模拟?在此示例中,没有封闭形式的表达式。
Answers:
一种选择是使用约束的HMC变体,如Brubaker等人(1)在“隐式定义的歧管上的MCMC方法家族”中所述。这就要求我们可以表达的条件,位置参数的最大似然估计等于某个固定为一些隐含定义(和微分)完整约束Ç ( { X 我} Ñ 我= 1) = 0。然后,我们可以模拟受此约束的受限哈密顿动力学,并像在标准HMC中一样在Metropolis-Hastings步骤中接受/拒绝。
负对数似然为 ,其具有相对于所述位置参数的第一和第二偏导数μ∂&大号
我不知道是否有暗示将有一个独特的MLE的任何结果给定{ X 我} ñ 我= 1 -密度无法登录凹在μ所以它似乎并不平凡,以保证这一点。如果有一个单一的独特的解决方案上述隐式地定义连接ñ - 1个嵌入维流形ř Ñ对应于该组的{ X 我} Ñ 我= 1与MLE为μ等于μ 0。如果存在多个解决方案,那么歧管可能由多个未连接的组件组成,其中一些可能对应于似然函数的最小值。在这种情况下,我们将需要一些其他机制来在未连接的组件之间移动(因为模拟动态通常将保持在单个组件之内),并检查二阶条件,如果它对应于移动到,则拒绝移动。可能性最小。
如果我们用表示向量[ x 1 … x N ] T并引入一个带有质量矩阵M的共轭动量状态p和一个用于标量约束c (x )的拉格朗日乘数λ,那么ODE的系统 d x的解 给定的初始条件X(0)=X0,p(0)=p0与Ç(X0)=0和 ∂ Ç
To see how constrained HMC performed for the case here I ran the geodesic integrator based constrained HMC implementation described in (4) and available on Github here (full disclosure: I am an author of (4) and owner of the Github repository), which uses a variation of the 'geodesic-BAOAB' integrator scheme proposed in (5) without the stochastic Ornstein-Uhlenbeck step. In my experience this geodesic integration scheme is generally a bit easier to tune than the RATTLE scheme used in (1) due the extra flexibility of using multiple smaller inner steps for the geodesic motion on the constraint manifold. An IPython notebook generating the results is available here.
. An initial corresponding to a MLE of was found by Newton's method (with the second order derivative checked to ensure a maxima of the likelihood was found). I ran a constrained dynamic with , interleaved with full momentum refreshals for 1000 updates. The plot below shows the resulting traces on the three components
and the corresponding values of the first and second order derivatives of the negative log-likelihood are shown below
from which it can be seen that we are at a maximum of the log-likelihood for all sampled . Although it is not readily apparent from the individual trace plots, the sampled lie on a 2D non-linear manifold embedded in - the animation below shows the samples in 3D
Depending on the interpretation of the constraint it may also be necessary to adjust the target density by some Jacobian factor as described in (4). In particular if we want results consistent with the limit of using an ABC like approach to approximately maintain the constraint by proposing unconstrained moves in and accepting if , then we need to multiply the target density by . In the above example I did not include this adjustment so the samples are from the original target density restricted to the constraint manifold.
M. A. Brubaker, M. Salzmann, and R. Urtasun. A family of MCMC methods on implicitly defined manifolds. In Proceedings of the 15th International Conference on Artificial Intelligence and Statistics, 2012.
http://www.cs.toronto.edu/~mbrubake/projects/AISTATS12.pdf
J.-P. Ryckaert, G. Ciccotti, and H. J. Berendsen.
Numerical integration of the Cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. Journal of Computational
Physics, 1977.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.399.6868
H. C. Andersen. RATTLE: A "velocity" version of the SHAKE algorithm for molecular dynamics calculations. Journal of Computational Physics, 1983.
http://www.sciencedirect.com/science/article/pii/0021999183900141
M. M. Graham and A. J. Storkey. Asymptotically exact inference in likelihood-free models. arXiv pre-print arXiv:1605.07826v3, 2016.
https://arxiv.org/abs/1605.07826
B. Leimkuhler and C. Matthews. Efficient molecular dynamics using geodesic integration and solvent–solute splitting. Proc. R. Soc. A. Vol. 472. No. 2189. The Royal Society, 2016.
http://rspa.royalsocietypublishing.org/content/472/2189/20160138.abstract