belirli bir MLE ile rastgele örnekleri simüle etme


17

Bu Çapraz Onaylı soru , sabit bir meblağa sahip olmak için şartlı bir örnek taklit etme sorusunu bana George Casella'nın belirlediği bir sorunu hatırlattı .

Parametrik bir model göz önüne alındığında, f(x|θ) , ve bu model bir iid örnek (X1,,Xn) , maksimum olabilirlik tahmininin θ verilir İçeride ISTV melerin RWMAIWi'nin ( X 1 , ... , x , n ) = arg dakika n i = 1 günlük f ( x i | θ ) Belirli bir θ değeri için

θ^(x1,,xn)=argmini=1nlogf(xi|θ)
θ , bir iid örneğini simüle etmenin genel bir yolu var mı (X1,,Xn) MLE değerine koşullu θ ( X 1 , ... , x , n ) ?θ^(X1,,Xn)

Örneğin, yoğunluk ( f ( x | μ ) = Γ ( 3 ) olan konum parametresi μ ile bir T5 dağılımı alınμ ise(X1,...,x, n) iid ~ f(x|μ)biz simüle nasıl(X1,...,x, n)şartına ^ ı (X,1,...,x, n)= T 5

f(x|μ)=Γ(3)Γ(1/2)Γ(5/2)[1+(xμ)2/5]3
(X1,,Xn)iidf(x|μ)
(X1,,Xn) ? Bundaμ^(X1,,Xn)=μ0T5 örnek dağılımı ^ ı ( x 1 , ... , x , n ) kapalı bir ifade yoktur.μ^(X1,,Xn)

Yanıtlar:


20

Bir seçenek, Brubaker ve arkadaşları (1) tarafından Kapalı Olarak Tanımlanmış Manifoldlar Üzerine MCMC Yöntemleri Ailesinde tarif edildiği gibi kısıtlanmış bir HMC varyantı kullanmak olacaktır . Bu, location parametresinin maksimum olabilirlik kestiriminin bazı örtülü olarak tanımlanmış (ve farklılaştırılabilir) holonomik kısıtlama c ( { x i } N i = 1 ) = 0 olduğu gibi bazı sabit eşit olduğu koşulunu ifade edebilmemizi gerektirir . Daha sonra bu kısıtlamaya bağlı kısıtlanmış bir Hamilton dinamikini simüle edebilir ve standart HMC'de olduğu gibi bir Metropolis-Hastings adımında kabul edebilir / reddedebiliriz.μ0c({xi}i=1N)=0

Negatif log olabilirliği μL konum parametresine göre birinci ve ikinci derece kısmi türevleri olansabit

L=i=1N[logf(xi|μ)]=3i=1N[log(1+(xiμ)25)]+constant
μ Maksimum olasılık olasılığıμ0, dolaylı olarakc=Ni=1[2(μ0-xi)için bir çözüm olarak tanımlanır
Lμ=3i=1N[2(μxi)5+(μxi)2]and2Lμ2=6i=1N[5(μxi)2(5+(μxi)2)2].
μ0
c=i=1N[2(μ0xi)5+(μ0xi)2]=0subject toi=1N[5(μ0xi)2(5+(μ0xi)2)2]>0.

için benzersiz bir MLE olacağını gösteren herhangi bir sonuç olup olmadığından emin değilimμ{xi}i=1N - the density is not log-concave in μ so it doesn't seem trivial to guarantee this. If there is a single unique solution the above implicitly defines a connected N1 dimensional manifold embedded in RN corresponding to the set of {xi}i=1N with MLE for μ equal to μ0. If there are multiple solutions then the manifold may consist of multiple non-connected components some of which may correspond to minima in the likelihood function. In this case we would need to have some additional mechanism for moving between the non-connected components (as the simulated dynamic will generally remain confined to a single component) and check the second-order condition and reject a move if it corresponds to moving to a minima in the likelihood.

If we use x to denote the vector [x1xN]T and introduce a conjugate momentum state p with mass matrix M and a Lagrange multiplier λ for the scalar constraint c(x) then the solution to system of ODEs

dxdt=M1p,dpdt=Lxλcxsubject toc(x)=0andcxM1p=0
given initial condition x(0)=x0, p(0)=p0 with c(x0)=0 and cx|x0M1p0=0, defines a constrained Hamiltonian dynamic which remains confined to the constraint manifold, is time reversible and exactly conserves the Hamiltonian and the manifold volume element. If we use a symplectic integrator for constrained Hamiltonian systems such as SHAKE (2) or RATTLE (3), which exactly maintain the constraint at each timestep by solving for the Lagrange multiplier, we can simulate the exact dynamic forward L discrete timesteps δt from some initial constraint satisfying x,p and accept the proposed new state pair x,p with probability
min{1,exp[L(x)L(x)+12pTM1p12pTM1p]}.
If we interleave these dynamics updates with partial / full resampling of the momenta from their Gaussian marginal (restricted to the linear subspace defined by cxM1p=0) then modulo the possiblity of there being multiple non-connected constraint manifold components, the overall MCMC dynamic should be ergodic and the configuration state samples x will coverge in distribution to the target density restricted to the constraint manifold.

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.

I used N=3, μ=1 and μ0=2. An initial x corresponding to a MLE of μ0 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 δt=0.5, L=5 interleaved with full momentum refreshals for 1000 updates. The plot below shows the resulting traces on the three x components

Trace plots for 3D example

and the corresponding values of the first and second order derivatives of the negative log-likelihood are shown below

Log-likelihood derivative trace plots

from which it can be seen that we are at a maximum of the log-likelihood for all sampled x. Although it is not readily apparent from the individual trace plots, the sampled x lie on a 2D non-linear manifold embedded in R3 - the animation below shows the samples in 3D

3D visualisation of samples confined to 2D manifold

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 ϵ0 limit of using an ABC like approach to approximately maintain the constraint by proposing unconstrained moves in RN and accepting if |c(x)|<ϵ, then we need to multiply the target density by cxTcx. In the above example I did not include this adjustment so the samples are from the original target density restricted to the constraint manifold.

References

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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


3
Brilliant and opening new and bright perspectives! Thank you.
Xi'an
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.