Sampling

Monte Carlo:

通过极限情况下的分布关系$\pi (x’) =\sum\limits_{x}{ \pi (x)P(x->x’)} $

有p(x’)$\approx\sum\limits_{x}{p(x)T(x—>x’)}$

若T满足regular markov chain的条件,则Monte Carlo方法保证在极限条件下收敛到目标分布。

Regular Markov Chain

转移矩阵经过若干次相乘后,所有项都不为0的马尔科夫链就是规则马尔科夫链。

   充分条件:任意两个状态都相连,每个状态自转移概率不为0.

An square matrix $A$ is called regular if for some integer $n$ all entries of $ A^n $ are positive.

Example

The matrix

\begin{displaymath}A = \left[ \begin{array}{rr} 0&1\\ 1&0\\ \end{array} \right]\end{displaymath}

is not a regular matrix, because for all positive integer $n$,

\begin{displaymath}A^{2n} = \left[ \begin{array}{rr} 1&0\\ 0&1\\ \end{arra... ...\left[ \begin{array}{rr} 0&1\\ 1&0\\ \end{array} \right]\end{displaymath}

The matrix $A =\left[ \begin{array}{rrrrr} .25&.20&.25&.30 \\ .20&.30&.25&.30 \\ .25&.20&.40&.10 \\ .30&.30&.10&.30 \\ \end{array} \right[ $

is a regular matrix, because $A^1 $ has all positive entries.

It can also be shown that all other eigenvalues of A are less than 1, and algebraic multiplicity of 1 is one.

It can be shown that if $A$ is a regular matrix then $ A^n $ approaches to a matrix $ Q $ whose columns are all equal to a probability vector $ q $ which is called the steady-state vector of the regular Markov chain.

\begin{displaymath}\mbox{ if } A \mbox{ regular, then } A^n \rightarrow Q = \lef... ...&&.\\ .&.&&&&.\\ q_k&q_k&.&.&.&q_k\\ \end{array} \right]\end{displaymath}

where $q_{1} + q_{2} + \dots + q_{k} = 1$.

It can be shown that for any probability vector $x^{(0) }$ when $n$ gets large, $A^n x^{(0)}$ approaches to the steady-state vector

\begin{displaymath}{\bf q } = \left[ \begin{array}{r} q_1\\ q_2\\ \vdots \\ q_k\\ \end{array} \right]\end{displaymath}

.

That is

\begin{displaymath}A^n x^{(0)} \longrightarrow q=\left[ \begin{array}{r} q_1\\ q_2\\ .\\ .\\ .\\ q_k\\ \end{array} \right]\end{displaymath}

where $q_{1} + q_{2} + \dots + q_{k} = 1$.

It can also be shown that the steady-state vector q is the only vector such that

\begin{displaymath}Aq = q\end{displaymath}

Note that this shows q is an eigenvector of A and $ 1$ is eigenvalue of A.

 

Mixed:收敛的

验证方法,通常不能验证已经mixed,但是能验证还不是mixed:

1、使用windows,截取一个时间段的数据看是否相近。但是可能在收敛过程中有小部分数据先聚集到一起,这不能说明是收敛的。

2、使用两个不同的初始状态的马尔科夫链。在同一个时间观察,如果数据不相近,则不是mixed。

实际中可以使用一个随机初始的,和一个高概率初始的来比较。

 

MCMC方法取得的样本不是IID的,所以有时需要间隔一段再取。

The faster the Markov Chain converges, the less correlated are the samples.

image

image

image

 

Gibbs Sampling

对多维数据有效。

image

不能mix的gibbs sampling chain

image

metropolis-hastings

image

转载于:https://www.cnblogs.com/huashiyiqike/p/3250545.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值