目录
1 Sampling from Random Variables 4 1.1 Standard distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Sampling from non-standard distributions . . . . . . . . . . . . . . . . . . . 7 1.2.1 Inverse transform sampling with discrete variables . . . . . . . . . . . 8 1.2.2 Inverse transform sampling with continuous variables . . . . . . . . . 11 1.2.3 Rejection sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Markov Chain Monte Carlo 15 2.1 Monte Carlo integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2 Markov Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 Putting it together: Markov chain Monte Carlo . . . . . . . . . . . . . . . . 18 2.4 Metropolis Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.5 Metropolis-Hastings Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.6 Metropolis-Hastings for Multivariate Distributions . . . . . . . . . . . . . . . 26 2.6.1 Blockwise updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.6.2 Componentwise updating . . . . . . . . . . . . . . . . . . . . . . . . . 31 2.7 Gibbs Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3 Basic concepts in Bayesian Data Analysis 39 3.1 Parameter Estimation Approaches . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.1 Maximum Likelihood . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.2 Maximum a posteriori . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.1.3 Posterior Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.2 Example: Estimating a Weibull distribution . . . . . . . . . . . . . . . . . . 42 3.3 Example: Logistic Regression . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4 Example: Mallows Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4 Directed Graphical Models 46 4.1 A Short Review of Probability Theory . . . . . . . . . . . . . . . . . . . . . 46 4.2 The Burglar Alarm Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2.1 Conditional probability tables . . . . . . . . . . . . . . . . . . . . . . 49 4.2.2 Explaining away . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.3 Joint distributions and independence relationships. . . . . . . . . . . 52 4.3 Graphical Model Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.3.1 Example: Consensus Modeling with Gaussian variables . . . . . . . . 54 5 Approximate Inference in Graphical Models 57 5.1 Prior predictive distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.2 Posterior distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.2.1 Rejection Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.2.2 MCMC Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.2.3 Example: Posterior Inference for the consensus modelwith normally distributed variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.2.4 Example: Posterior Inference for the consensus modelwith contaminants 66 6 Sequential Monte Carlo 69 6.1 Hidden Markov Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.1.1 Example HMM with discrete outcomes and states . . . . . . . . . . . 71 6.1.2 Viterbi Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.2 Bayesian Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 6.3 Particle Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 6.3.1 Sampling Importance Resampling (SIR) . . . . . . . . . . . . . . . . 74 6.3.2 Direct Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
本帖隐藏的内容 (15)MCMC matlab.pdf 大小:(1.14 MB) 只需: 2 个论坛币 马上下载
只需: 2 个论坛币 马上下载
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
yulixige 发表于 2014-8-26 23:07 谢谢楼主分享,我也在学习啊!!!
fantuanxiaot 发表于 2014-8-26 19:34 目录 1 Sampling from Random Variables 4 1.1 Standard distributions . . . . . . . . . . . . . . ...
zxxsm 发表于 2014-8-27 08:47 Thank You For Sharing!
yiweidon 发表于 2014-8-27 09:24 貌似不错的说
lemonbt 发表于 2014-8-27 09:50 楼主有对应的数据吗
wujianjack2 发表于 2014-8-27 09:55 看起来非常棒,谢谢分享!
fantuanxiaot 发表于 2014-8-27 09:57 那是绝对的棒