zoukankan      html  css  js  c++  java
  • Metropolis-Hastings算法

    参考文献:Morten Hjorth-jensen 计算物理讲义

    1. Metropolis-Hastings算法

    1.1 随机行走:行走概率 (T(i ightarrow j))和接受概率 (A(i ightarrow j))

    随机行者的跃迁概率为

    [W( i ightarrow j ) = T(i ightarrow j) A(i ightarrow j). ]

    1.2 分布的演变

    我们假定有大量的行者,它们在 (t) 时刻的分布为 (omega(i,t)),那么,下一步的分布为

    [omega(i,t+1) = sum_j omega(j,t) T( j ightarrow i ) A( j ightarrow i ) + sum_j omega(i,t) T( i ightarrow j ) ( 1 - A(i ightarrow j) ). ]

    第一项表示移动到 (i) 然后被接受的情况,第二项表示从 (i) 移动然后被拒绝的情况。
    因为 (sum_j T(i ightarrow j) = 1),所以上式可以改写为

    [omega(i, t+1) - omega(i,t) = sum_j omega(j,t) T( j ightarrow i ) A( j ightarrow i ) - sum_j omega(i,t) T( i ightarrow j ) A(i ightarrow j) ). ]

    上式左侧是纯收入,右侧第一项表示进账,第二项表示支出。
    所以,时间足够长以后,(t ightarrow infty), 如果体系达到稳态,(omega(i, infty))保持不变,得到我们最初想要的分布,就一切OK了。

    1.3 细致平衡

    所以,达到稳态以后,一定有

    [sum_j omega(j,t) T( j ightarrow i ) A( j ightarrow i ) - sum_j omega(i,t) T( i ightarrow j ) A(i ightarrow j) ) = 0, ]

    据说这个条件必要但不充分,更充分的是细致平衡:

    [omega(j) T( j ightarrow i ) A( j ightarrow i ) = omega(i) T( i ightarrow j ) A(i ightarrow j) ), ]

    这个就叫做 Metropolis-Hastings。如果 (T(j ightarrow i) = T(i ightarrow j)) 则叫做 Metropolis算法,剩下的就是设计 (A(i ightarrow j), A(j ightarrow i)),使得

    [frac{ A( j ightarrow i ) }{ A(i ightarrow j) ) } = frac{omega(i)}{omega(j)}, ]

    其中 (omega(i), omega(j)) 是目标分布。

    有个简单的关系,被冠以复杂的名字:Einstein-Smoluchenski-Kolmogorov-Chapman (ESKC)关系:

    [W(vec{x}, t|vec{x}_0, t_0) = int^infty_{-infty} W(vec{x},t|vec{x}', t') W(vec{x}', t' | vec{x}_0, t_0 ) dvec{x}', ]

    它的意思非常直白:昨天从美国出发、明天到达中国的概率,是所有昨天从美国出发、今天到各个国家玩、明天到美国的概率之和。

  • 相关阅读:
    poj 2312 Battle City
    poj 2002 Squares
    poj 3641 Pseudoprime numbers
    poj 3580 SuperMemo
    poj 3281 Dining
    poj 3259 Wormholes
    poj 3080 Blue Jeans
    poj 3070 Fibonacci
    poj 2887 Big String
    poj 2631 Roads in the North
  • 原文地址:https://www.cnblogs.com/luyi07/p/15392998.html
Copyright © 2011-2022 走看看