SlideShare a Scribd company logo
1 of 52
Download to read offline
kos59125


[2011-09-24] Tokyo.R#17
1
..


2
..


3
..




4
..
1
..


2
..


3
..




4
..
• Twitter ID: kos59125
• R           :7
1
..


2
..


3
..




4
..
.
..
 .
.
..
                          P(D|θ) π(θ)
             f (θ|D) =                ∝ P(D|θ) π(θ)
                            P(D)

         •       π(θ):                          D
                                    θ
         •   P(D|θ):                    D                       θ

         •        f (θ|D):              D
 .                              θ
     ∝                                      x   f (x) = cg(x)       c
                 f (x) ∝ g(x)
.
..
         N(µ, 52 )                 3

                       4.7,    11.9,   13.4

                     π(µ)              N(0, 102 )
                                        (          )
                              1              µ2
            π(µ) =          √        exp −
                             2π · 10       2 · 102

 .   µ
(                 )
              1              (4.7 − µ)2
P(D|µ) =    √        exp −
              2π · 5            2 · 52
                                  (               )
                       1              (11.9 − µ)2
                × √          exp −
                      2π · 5              2 · 52
                                  (               )
                       1              (13.4 − µ)2
                × √          exp −
                      2π · 5              2 · 52
               (                                          )
                   (4.7 − µ)2 + (11.9 − µ)2 + (13.4 − µ)2
      ∝    exp −
                                      2 · 52
               (                                       )
                   3µ2 − 60µ + (4.72 + 11.92 + 13.42 )
      =    exp −
                                    2 · 52
               (               )
                   3µ2 − 60µ
      ∝    exp −
                      2 · 52
f (µ|D) ∝ P(D|µ) π(µ)
              (              )      (         )
                 3µ2 − 60µ               µ2
        ∝ exp −                exp −
                   2 · 52             2 · 102
               (              )2              
               µ − 120/13 − (120/13)2 
                                              
        = exp −
              
              
                                               
                                               
                                               
                          2 · 100/13
                                   (            ) 
                 1                 µ − 120/13 2 
                                                  
        ∝ √      √          exp −
                                  
                                                   
                                                   
            2π · 100/13               2 · 100/13 
.
..
         N(µ, 52 )                  3

                       4.7,    11.9,      13.4

                     π(µ)              N(0, 102 )
                                        (          )
                              1              µ2
            π(µ) =          √        exp −
                             2π · 10       2 · 102

 .   µ

 .
..                                  (             )
                                        120 100
                                N          ,
 .                                      13 13
µ
•
•       (
    )
•
1
..


2
..


3
..




4
..
.
        (Approximate Bayesian Computation,
 ABC)
..
    •


. •
1
..


2
..


3
..




4
..
.
                (Rectangular Kernel)
..
 n   x1 , . . . , xn                              f (x)
                                                  f (x)
         h

                   1 ∑
                              n
          f (x) =         I(|x − x j | ≤ h)
                  2nh j=1

                       I(X)       X           1
.        0


                    F(x + h) − F(x − h)
       fh (x) ≡
                            2h
                     1
                  =    P(x − h < X ≤ x + h)
                    2h
.
                        (1)
..
                        θ       n
 D′ , . . . , D′
  1            n                P(D|θ)          ρ
    ϵ

                            1∑
                                     n
                   P(D|θ) ∝       I(ρ(D, D′j ) ≤ ϵ)
                          θ n j=1

                              I(X)       X            1
 .                  0

         ϵ→∞
.
                       (2)
..
                       θ            n
 D′ , . . . , D′
  1            n                    P(D|θ)        Sa        ρ
                       ϵ

                        1∑
                                   n
               P(D|θ) ∝       I(ρ(S(D), S(D′j )) ≤ ϵ)
                      θ n j=1

                                 I(X)   X               1
                   0

 .
     a
              S              D
1
..


2
..


3
..




4
..
.
                           (without ABC)
..
     1
     ..    θ           π(·)
     2
     ..    θ        P(D|θ)       a

     3
     ..    1
      a
          max P(D|θ) ≤ c                   c
           θ
 P(D|θ)/c
 .

                   1               f (θ|D)
                     P(D|θ) =      c         ≤ 1
                   c                    π(θ)
                                 P(D)
likelihood <- (function(data) {
   L <- function(m) prod(dnorm(data, m, 5))
   function(mu) sapply(mu, L)
})(observed)
ML <- likelihood(mean(observed))

posterior <- numeric()
while ((n <- N - length(posterior)) > 0) {
   theta <- rprior(n)
   posterior <- c(posterior, theta[runif(n) <= likelihood(theta)/ML])
}
µ
.
                          (with ABC)
..
     1
     ..   θ             π(·)
                   ′
     2
     ..   θ     D
     ..
     3    ρ(S(D), S(D′ )) ≤ ϵ     θ

 .   4
     ..   1
distance <- (function(data)
   function(mu) {
      S <- function(m) mean(rnorm(length(data), m, 5))
      abs((mean(data) - sapply(mu, S)) / mean(data))
   }
)(observed)

posterior <- numeric()
while ((n <- N - length(posterior)) > 0) {
   theta <- rprior(n)
   posterior <- c(posterior, theta[distance(theta) <= TOLERANCE])
}
µ
.
 MCMC (M-H algorithm without ABC)
..
         ′
    .. θ
    1             q(θ → θ′ )
              {                             }
                  P(D|θ′ ) π(θ′ ) q(θ′ → θ)
    2
    ..     min 1,                                      θ′
                  P(D|θ) π(θ) q(θ → θ′ )
 . .3. 1
                       P(D|θ′ ) π(θ′ )
         f (θ′ |D)        P(D)               P(D|θ′ ) π(θ′ )
                   =                     =
          f (θ|D)      P(D|θ) π(θ)           P(D|θ) π(θ)
                         P(D)
likelihood <- (function(data) {
    L <- function(m) prod(dnorm(data, m, 5))
    function(mu) sapply(mu, L)
 })(observed)
 ratio <- function(mu1, mu2)
    (likelihood(mu2) /likelihood(mu1)) * (dprior(mu2) / dprior(mu1)) *
       (dtransition(mu2, mu1) / dtransition(mu1, mu2))

 chain <- numeric(N)
 chain[1] <- rprior(1)
 t <- 1; while (t < length(chain)) {
    proposal <- rtransition(chain[t])
    probability <- min(1, ratio(chain[t], proposal))
    if (runif(1) <= probability) {
       chain[t + 1] <- proposal
       t <- t + 1
    }
 }




                   (             ratio)
log
µ
.
 MCMC (M-H algorithm with ABC)
..
       ′
   .. θ
   1                 q(θ → θ′ )
       ′
   .. θ
   2          D′
                 ′
   .. ρ(S(D), S(D )) > ϵ
   3                            1
                              {                    }
                   ′
                                  π(θ′ ) q(θ′ → θ)
   4
   ..     α(θ → θ ) = min 1,                                                     θ′
                                  π(θ) q(θ → θ′ )

.   5
    ..   1
                 π(θ′ ) q(θ′ →θ)
α(θ → θ′ ) =     π(θ) q(θ→θ′ )     (≤ 1)

                 f (θ|ρ ≤ ϵ) q(θ → θ′ ) P(ρ ≤ ϵ|θ′ ) α(θ → θ′ )
                 P(ρ ≤ ϵ|θ)π(θ)                         π(θ′ ) q(θ′ → θ)
             =                  q(θ → θ′ ) P(ρ ≤ ϵ|θ′ )
                    P(ρ ≤ ϵ)                            π(θ) q(θ → θ′ )
             =   f (θ′ |ρ ≤ ϵ) q(θ′ → θ) P(ρ ≤ ϵ|θ) α(θ′ → θ)     (∵ α(θ′ → θ) = 1)


α(θ → θ′ ) = 1
distance <- (function(data)
    function(mu) {
       S <- function(m) mean(rnorm(length(data), m, 5))
       abs((mean(data) - sapply(mu, S)) / mean(data))
    }
 )(observed)
 ratio <- function(mu1, mu2)
    (dprior(mu2) / dprior(mu1)) *
       (dtransition(mu2, mu1) / dtransition(mu1, mu2))

 chain <- numeric(N)
 while (distance(chain[1] <- rprior(1)) > TOLERANCE) {}
 t <- 1; while (t < length(chain)) {
    proposal <- rtransition(chain[t])
    if (distance(proposal) <= TOLERANCE) {
       probability <- min(1, ratio(chain[t], proposal))
       if (runif(1) <= probability) {
          chain[t + 1] <- proposal
          t <- t + 1
       }
    }
 }




                   (             ratio)
log
µ
ϵ
•
•
.
                                (with ABC            )
..
     1
     ..   θ1 , . . . , θkN (k > 1)                           π(·)
     2
     ..   θi           D′i
     3
     ..   ρ(S(D), S(D′ ))    i
     4
     ..                              (1), . . . , (kN)         {θ(1) , . . . , θ(N) }
 .

                                                         ϵ = ρ(S(D), S(D′ ))
                                                                        (N)
distance <- (function(data)
   function(mu) {
      S <- function(m) mean(rnorm(length(data), m, 5))
      abs((mean(data) - sapply(mu, S)) / mean(data))
   }
)(observed)

prior <- rprior(k * N)
sortedDistance <- sort(distance(prior), index.return=TRUE)
posterior <- prior[sortedDistance$ix[1:N]]
µ
•
•
•
•
CRAN   abc
→
1
..


2
..


3
..




4
..
.
..
 .



 .
..
     (   )
 .
.
..
 .


          : 突然変異




     現在      過去
.
..
         a
             N            k

                     (          )
                     k(k − 1)
                 EXP
                       2N


     a
 .                   (              )
.
..

         POIS(Lµ)

     L       (      )   µ
 .
現在   分化   過去


•
    ⇒
    ⇒
•
.
..
 2               Hana mogeraa        2
                                                 b
                                                     (
         2                                   )

     •       1            N    400,000
     •       2            rN        1  2
     •                      aN               1   5

     •           (T; 4N          )       2
     a
     b
.
集団 1   2N
                                         2aN
集団 2   2rN


             0                T


                 N    ∼   U(0, 400000)
                  r   ∼   U(0, 2)
                 a    ∼   U(0, 5)
                 T    ∼   U(0, 2)
•                                                     30
                           1

         •                                       10−5
         •                                  20
   •                                                              S
                                        k


                   (S1 , k1 , S2 , k2 ) = (15.4, 2.9, 8.9, 0.3)




   1

(N, r, a, T) = (80000, 0.1, 3.0, 0.1)
•
•
•
´
[1] Marjoram P, Molitor J, Plagnol V, and Tavare S (2003)
    Markov chain Monte Carlo without likelihoods. PNAS,
    100: 15324–15328.
[2]           (2001)
         .                 , 31: 305–344.
[3]           (2005)
                       .                        , 12:
                                                        II
                                            (           )
      pp.153–211.
[4] Robert CP (2010) MCMC and Likelihood-free
    Methods. SlideShare.
https://bitbucket.org/kos59125/tokyo.r-17/

More Related Content

What's hot

PRML 8.2 条件付き独立性
PRML 8.2 条件付き独立性PRML 8.2 条件付き独立性
PRML 8.2 条件付き独立性sleepy_yoshi
 
PRML 6.1章 カーネル法と双対表現
PRML 6.1章 カーネル法と双対表現PRML 6.1章 カーネル法と双対表現
PRML 6.1章 カーネル法と双対表現hagino 3000
 
【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised Learningまとめ【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised LearningまとめDeep Learning JP
 
Sliced Wasserstein Distance for Learning Gaussian Mixture Models
Sliced Wasserstein Distance for Learning Gaussian Mixture ModelsSliced Wasserstein Distance for Learning Gaussian Mixture Models
Sliced Wasserstein Distance for Learning Gaussian Mixture ModelsFujimoto Keisuke
 
Cosine Based Softmax による Metric Learning が上手くいく理由
Cosine Based Softmax による Metric Learning が上手くいく理由Cosine Based Softmax による Metric Learning が上手くいく理由
Cosine Based Softmax による Metric Learning が上手くいく理由tancoro
 
機械学習による統計的実験計画(ベイズ最適化を中心に)
機械学習による統計的実験計画(ベイズ最適化を中心に)機械学習による統計的実験計画(ベイズ最適化を中心に)
機械学習による統計的実験計画(ベイズ最適化を中心に)Kota Matsui
 
幾何を使った統計のはなし
幾何を使った統計のはなし幾何を使った統計のはなし
幾何を使った統計のはなしToru Imai
 
モンテカルロサンプリング
モンテカルロサンプリングモンテカルロサンプリング
モンテカルロサンプリングKosei ABE
 
スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元Shogo Muramatsu
 
今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシンShinya Shimizu
 
Graph Attention Network
Graph Attention NetworkGraph Attention Network
Graph Attention NetworkTakahiro Kubo
 
ベイズ統計学の概論的紹介
ベイズ統計学の概論的紹介ベイズ統計学の概論的紹介
ベイズ統計学の概論的紹介Naoki Hayashi
 
PRML 1.5-1.5.5 決定理論
PRML 1.5-1.5.5 決定理論PRML 1.5-1.5.5 決定理論
PRML 1.5-1.5.5 決定理論Akihiro Nitta
 
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展Shiga University, RIKEN
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理Taiji Suzuki
 
[DL輪読会]GANとエネルギーベースモデル
[DL輪読会]GANとエネルギーベースモデル[DL輪読会]GANとエネルギーベースモデル
[DL輪読会]GANとエネルギーベースモデルDeep Learning JP
 
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningssuserca2822
 

What's hot (20)

PRML 8.2 条件付き独立性
PRML 8.2 条件付き独立性PRML 8.2 条件付き独立性
PRML 8.2 条件付き独立性
 
PRML 6.1章 カーネル法と双対表現
PRML 6.1章 カーネル法と双対表現PRML 6.1章 カーネル法と双対表現
PRML 6.1章 カーネル法と双対表現
 
PRML 第4章
PRML 第4章PRML 第4章
PRML 第4章
 
【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised Learningまとめ【DL輪読会】ViT + Self Supervised Learningまとめ
【DL輪読会】ViT + Self Supervised Learningまとめ
 
Sliced Wasserstein Distance for Learning Gaussian Mixture Models
Sliced Wasserstein Distance for Learning Gaussian Mixture ModelsSliced Wasserstein Distance for Learning Gaussian Mixture Models
Sliced Wasserstein Distance for Learning Gaussian Mixture Models
 
Cosine Based Softmax による Metric Learning が上手くいく理由
Cosine Based Softmax による Metric Learning が上手くいく理由Cosine Based Softmax による Metric Learning が上手くいく理由
Cosine Based Softmax による Metric Learning が上手くいく理由
 
機械学習による統計的実験計画(ベイズ最適化を中心に)
機械学習による統計的実験計画(ベイズ最適化を中心に)機械学習による統計的実験計画(ベイズ最適化を中心に)
機械学習による統計的実験計画(ベイズ最適化を中心に)
 
PRMLrevenge_3.3
PRMLrevenge_3.3PRMLrevenge_3.3
PRMLrevenge_3.3
 
幾何を使った統計のはなし
幾何を使った統計のはなし幾何を使った統計のはなし
幾何を使った統計のはなし
 
モンテカルロサンプリング
モンテカルロサンプリングモンテカルロサンプリング
モンテカルロサンプリング
 
スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元
 
今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン
 
Graph Attention Network
Graph Attention NetworkGraph Attention Network
Graph Attention Network
 
ベイズ統計学の概論的紹介
ベイズ統計学の概論的紹介ベイズ統計学の概論的紹介
ベイズ統計学の概論的紹介
 
PRML 1.5-1.5.5 決定理論
PRML 1.5-1.5.5 決定理論PRML 1.5-1.5.5 決定理論
PRML 1.5-1.5.5 決定理論
 
正準相関分析
正準相関分析正準相関分析
正準相関分析
 
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展
構造方程式モデルによる因果推論: 因果構造探索に関する最近の発展
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理
 
[DL輪読会]GANとエネルギーベースモデル
[DL輪読会]GANとエネルギーベースモデル[DL輪読会]GANとエネルギーベースモデル
[DL輪読会]GANとエネルギーベースモデル
 
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
 

Viewers also liked

サーバ異常検知入門
サーバ異常検知入門サーバ異常検知入門
サーバ異常検知入門mangantempy
 
Rで解く最適化問題 線型計画問題編
Rで解く最適化問題   線型計画問題編 Rで解く最適化問題   線型計画問題編
Rで解く最適化問題 線型計画問題編 Hidekazu Tanaka
 
3次元のデータをグラフにする(Tokyo.R#17)
3次元のデータをグラフにする(Tokyo.R#17)3次元のデータをグラフにする(Tokyo.R#17)
3次元のデータをグラフにする(Tokyo.R#17)Takumi Tsutaya
 
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -Yohei Sato
 
Rて計量経済学入門#tokyo.r.17
Rて計量経済学入門#tokyo.r.17Rて計量経済学入門#tokyo.r.17
Rて計量経済学入門#tokyo.r.17yuuukioii
 
Rによるデータサイエンス:12章「時系列」
Rによるデータサイエンス:12章「時系列」Rによるデータサイエンス:12章「時系列」
Rによるデータサイエンス:12章「時系列」Nagi Teramo
 
学部生向けベイズ統計イントロ(公開版)
学部生向けベイズ統計イントロ(公開版)学部生向けベイズ統計イントロ(公開版)
学部生向けベイズ統計イントロ(公開版)考司 小杉
 
エクセルで統計分析 統計プログラムHADについて
エクセルで統計分析 統計プログラムHADについてエクセルで統計分析 統計プログラムHADについて
エクセルで統計分析 統計プログラムHADについてHiroshi Shimizu
 
ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)Shuuji Mihara
 
ノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリングノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリング智文 中野
 
ベイズ推定の概要@広島ベイズ塾
ベイズ推定の概要@広島ベイズ塾ベイズ推定の概要@広島ベイズ塾
ベイズ推定の概要@広島ベイズ塾Yoshitake Takebayashi
 
TokyoWebmining統計学部 第1回
TokyoWebmining統計学部 第1回TokyoWebmining統計学部 第1回
TokyoWebmining統計学部 第1回Issei Kurahashi
 
R を起動するその前に
R を起動するその前にR を起動するその前に
R を起動するその前にKosei ABE
 
第5章glmの尤度比検定と検定の非対称性 前編
第5章glmの尤度比検定と検定の非対称性 前編第5章glmの尤度比検定と検定の非対称性 前編
第5章glmの尤度比検定と検定の非対称性 前編T T
 
Rデバッグあれこれ
RデバッグあれこれRデバッグあれこれ
RデバッグあれこれTakeshi Arabiki
 

Viewers also liked (20)

Tokyor17
Tokyor17Tokyor17
Tokyor17
 
サーバ異常検知入門
サーバ異常検知入門サーバ異常検知入門
サーバ異常検知入門
 
Rで解く最適化問題 線型計画問題編
Rで解く最適化問題   線型計画問題編 Rで解く最適化問題   線型計画問題編
Rで解く最適化問題 線型計画問題編
 
3次元のデータをグラフにする(Tokyo.R#17)
3次元のデータをグラフにする(Tokyo.R#17)3次元のデータをグラフにする(Tokyo.R#17)
3次元のデータをグラフにする(Tokyo.R#17)
 
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -
Rで学ぶ 傾向スコア解析入門 - 無作為割り当てが出来ない時の因果効果推定 -
 
Rて計量経済学入門#tokyo.r.17
Rて計量経済学入門#tokyo.r.17Rて計量経済学入門#tokyo.r.17
Rて計量経済学入門#tokyo.r.17
 
Rによるデータサイエンス:12章「時系列」
Rによるデータサイエンス:12章「時系列」Rによるデータサイエンス:12章「時系列」
Rによるデータサイエンス:12章「時系列」
 
学部生向けベイズ統計イントロ(公開版)
学部生向けベイズ統計イントロ(公開版)学部生向けベイズ統計イントロ(公開版)
学部生向けベイズ統計イントロ(公開版)
 
エクセルで統計分析 統計プログラムHADについて
エクセルで統計分析 統計プログラムHADについてエクセルで統計分析 統計プログラムHADについて
エクセルで統計分析 統計プログラムHADについて
 
ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)ベイズ学習勉強会 EMアルゴリズム (作成途中)
ベイズ学習勉強会 EMアルゴリズム (作成途中)
 
ノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリングノンパラメトリックベイズ4章クラスタリング
ノンパラメトリックベイズ4章クラスタリング
 
ベイズ推定の概要@広島ベイズ塾
ベイズ推定の概要@広島ベイズ塾ベイズ推定の概要@広島ベイズ塾
ベイズ推定の概要@広島ベイズ塾
 
Tokyor18
Tokyor18Tokyor18
Tokyor18
 
2ch
2ch2ch
2ch
 
TokyoWebmining統計学部 第1回
TokyoWebmining統計学部 第1回TokyoWebmining統計学部 第1回
TokyoWebmining統計学部 第1回
 
Tokyo r 10_12
Tokyo r 10_12Tokyo r 10_12
Tokyo r 10_12
 
Tokyor16
Tokyor16Tokyor16
Tokyor16
 
R を起動するその前に
R を起動するその前にR を起動するその前に
R を起動するその前に
 
第5章glmの尤度比検定と検定の非対称性 前編
第5章glmの尤度比検定と検定の非対称性 前編第5章glmの尤度比検定と検定の非対称性 前編
第5章glmの尤度比検定と検定の非対称性 前編
 
Rデバッグあれこれ
RデバッグあれこれRデバッグあれこれ
Rデバッグあれこれ
 

Similar to 近似ベイズ計算によるベイズ推定

Dual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton TensorDual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton TensorSebastian De Haro
 
Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.SEENET-MTP
 
Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3Sebastian De Haro
 
Tensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationTensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationAlexander Litvinenko
 
Additional notes EC220
Additional notes EC220Additional notes EC220
Additional notes EC220Guo Xu
 
Jyokyo-kai-20120605
Jyokyo-kai-20120605Jyokyo-kai-20120605
Jyokyo-kai-20120605ketanaka
 
Andreas Eberle
Andreas EberleAndreas Eberle
Andreas EberleBigMC
 
A Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeA Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeVjekoslavKovac1
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
My PhD talk "Application of H-matrices for computing partial inverse"
My PhD talk "Application of H-matrices for computing partial inverse"My PhD talk "Application of H-matrices for computing partial inverse"
My PhD talk "Application of H-matrices for computing partial inverse"Alexander Litvinenko
 
Quantitative norm convergence of some ergodic averages
Quantitative norm convergence of some ergodic averagesQuantitative norm convergence of some ergodic averages
Quantitative norm convergence of some ergodic averagesVjekoslavKovac1
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrixRumah Belajar
 

Similar to 近似ベイズ計算によるベイズ推定 (20)

Dual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton TensorDual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
Dual Gravitons in AdS4/CFT3 and the Holographic Cotton Tensor
 
Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.Cosmin Crucean: Perturbative QED on de Sitter Universe.
Cosmin Crucean: Perturbative QED on de Sitter Universe.
 
Holographic Cotton Tensor
Holographic Cotton TensorHolographic Cotton Tensor
Holographic Cotton Tensor
 
Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3Instantons and Chern-Simons Terms in AdS4/CFT3
Instantons and Chern-Simons Terms in AdS4/CFT3
 
Tensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantificationTensor Train data format for uncertainty quantification
Tensor Train data format for uncertainty quantification
 
Additional notes EC220
Additional notes EC220Additional notes EC220
Additional notes EC220
 
Jyokyo-kai-20120605
Jyokyo-kai-20120605Jyokyo-kai-20120605
Jyokyo-kai-20120605
 
Andreas Eberle
Andreas EberleAndreas Eberle
Andreas Eberle
 
A Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cubeA Szemeredi-type theorem for subsets of the unit cube
A Szemeredi-type theorem for subsets of the unit cube
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Linear Differential Equations1
Linear Differential Equations1Linear Differential Equations1
Linear Differential Equations1
 
Sect1 5
Sect1 5Sect1 5
Sect1 5
 
Tam 2nd
Tam 2ndTam 2nd
Tam 2nd
 
Calculo Diferencial
Calculo DiferencialCalculo Diferencial
Calculo Diferencial
 
125 5.2
125 5.2125 5.2
125 5.2
 
My PhD talk "Application of H-matrices for computing partial inverse"
My PhD talk "Application of H-matrices for computing partial inverse"My PhD talk "Application of H-matrices for computing partial inverse"
My PhD talk "Application of H-matrices for computing partial inverse"
 
Ex algebra (5)
Ex algebra  (5)Ex algebra  (5)
Ex algebra (5)
 
Quantitative norm convergence of some ergodic averages
Quantitative norm convergence of some ergodic averagesQuantitative norm convergence of some ergodic averages
Quantitative norm convergence of some ergodic averages
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
 
Rousseau
RousseauRousseau
Rousseau
 

Recently uploaded

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 

Recently uploaded (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 

近似ベイズ計算によるベイズ推定

  • 4. • Twitter ID: kos59125 • R :7
  • 7. . .. P(D|θ) π(θ) f (θ|D) = ∝ P(D|θ) π(θ) P(D) • π(θ): D θ • P(D|θ): D θ • f (θ|D): D . θ ∝ x f (x) = cg(x) c f (x) ∝ g(x)
  • 8. . .. N(µ, 52 ) 3 4.7, 11.9, 13.4 π(µ) N(0, 102 ) ( ) 1 µ2 π(µ) = √ exp − 2π · 10 2 · 102 . µ
  • 9. ( ) 1 (4.7 − µ)2 P(D|µ) = √ exp − 2π · 5 2 · 52 ( ) 1 (11.9 − µ)2 × √ exp − 2π · 5 2 · 52 ( ) 1 (13.4 − µ)2 × √ exp − 2π · 5 2 · 52 ( ) (4.7 − µ)2 + (11.9 − µ)2 + (13.4 − µ)2 ∝ exp − 2 · 52 ( ) 3µ2 − 60µ + (4.72 + 11.92 + 13.42 ) = exp − 2 · 52 ( ) 3µ2 − 60µ ∝ exp − 2 · 52
  • 10. f (µ|D) ∝ P(D|µ) π(µ) ( ) ( ) 3µ2 − 60µ µ2 ∝ exp − exp − 2 · 52 2 · 102  ( )2   µ − 120/13 − (120/13)2    = exp −      2 · 100/13  ( )  1  µ − 120/13 2    ∝ √ √ exp −    2π · 100/13 2 · 100/13 
  • 11. . .. N(µ, 52 ) 3 4.7, 11.9, 13.4 π(µ) N(0, 102 ) ( ) 1 µ2 π(µ) = √ exp − 2π · 10 2 · 102 . µ . .. ( ) 120 100 N , . 13 13
  • 12. µ
  • 13. • • ( ) •
  • 15. . (Approximate Bayesian Computation, ABC) .. • . •
  • 17. . (Rectangular Kernel) .. n x1 , . . . , xn f (x) f (x) h 1 ∑ n f (x) = I(|x − x j | ≤ h) 2nh j=1 I(X) X 1 . 0 F(x + h) − F(x − h) fh (x) ≡ 2h 1 = P(x − h < X ≤ x + h) 2h
  • 18. . (1) .. θ n D′ , . . . , D′ 1 n P(D|θ) ρ ϵ 1∑ n P(D|θ) ∝ I(ρ(D, D′j ) ≤ ϵ) θ n j=1 I(X) X 1 . 0 ϵ→∞
  • 19. . (2) .. θ n D′ , . . . , D′ 1 n P(D|θ) Sa ρ ϵ 1∑ n P(D|θ) ∝ I(ρ(S(D), S(D′j )) ≤ ϵ) θ n j=1 I(X) X 1 0 . a S D
  • 21. . (without ABC) .. 1 .. θ π(·) 2 .. θ P(D|θ) a 3 .. 1 a max P(D|θ) ≤ c c θ P(D|θ)/c . 1 f (θ|D) P(D|θ) = c ≤ 1 c π(θ) P(D)
  • 22. likelihood <- (function(data) { L <- function(m) prod(dnorm(data, m, 5)) function(mu) sapply(mu, L) })(observed) ML <- likelihood(mean(observed)) posterior <- numeric() while ((n <- N - length(posterior)) > 0) { theta <- rprior(n) posterior <- c(posterior, theta[runif(n) <= likelihood(theta)/ML]) }
  • 23. µ
  • 24. . (with ABC) .. 1 .. θ π(·) ′ 2 .. θ D .. 3 ρ(S(D), S(D′ )) ≤ ϵ θ . 4 .. 1
  • 25. distance <- (function(data) function(mu) { S <- function(m) mean(rnorm(length(data), m, 5)) abs((mean(data) - sapply(mu, S)) / mean(data)) } )(observed) posterior <- numeric() while ((n <- N - length(posterior)) > 0) { theta <- rprior(n) posterior <- c(posterior, theta[distance(theta) <= TOLERANCE]) }
  • 26. µ
  • 27. . MCMC (M-H algorithm without ABC) .. ′ .. θ 1 q(θ → θ′ ) { } P(D|θ′ ) π(θ′ ) q(θ′ → θ) 2 .. min 1, θ′ P(D|θ) π(θ) q(θ → θ′ ) . .3. 1 P(D|θ′ ) π(θ′ ) f (θ′ |D) P(D) P(D|θ′ ) π(θ′ ) = = f (θ|D) P(D|θ) π(θ) P(D|θ) π(θ) P(D)
  • 28. likelihood <- (function(data) { L <- function(m) prod(dnorm(data, m, 5)) function(mu) sapply(mu, L) })(observed) ratio <- function(mu1, mu2) (likelihood(mu2) /likelihood(mu1)) * (dprior(mu2) / dprior(mu1)) * (dtransition(mu2, mu1) / dtransition(mu1, mu2)) chain <- numeric(N) chain[1] <- rprior(1) t <- 1; while (t < length(chain)) { proposal <- rtransition(chain[t]) probability <- min(1, ratio(chain[t], proposal)) if (runif(1) <= probability) { chain[t + 1] <- proposal t <- t + 1 } } ( ratio) log
  • 29. µ
  • 30. . MCMC (M-H algorithm with ABC) .. ′ .. θ 1 q(θ → θ′ ) ′ .. θ 2 D′ ′ .. ρ(S(D), S(D )) > ϵ 3 1 { } ′ π(θ′ ) q(θ′ → θ) 4 .. α(θ → θ ) = min 1, θ′ π(θ) q(θ → θ′ ) . 5 .. 1 π(θ′ ) q(θ′ →θ) α(θ → θ′ ) = π(θ) q(θ→θ′ ) (≤ 1) f (θ|ρ ≤ ϵ) q(θ → θ′ ) P(ρ ≤ ϵ|θ′ ) α(θ → θ′ ) P(ρ ≤ ϵ|θ)π(θ) π(θ′ ) q(θ′ → θ) = q(θ → θ′ ) P(ρ ≤ ϵ|θ′ ) P(ρ ≤ ϵ) π(θ) q(θ → θ′ ) = f (θ′ |ρ ≤ ϵ) q(θ′ → θ) P(ρ ≤ ϵ|θ) α(θ′ → θ) (∵ α(θ′ → θ) = 1) α(θ → θ′ ) = 1
  • 31. distance <- (function(data) function(mu) { S <- function(m) mean(rnorm(length(data), m, 5)) abs((mean(data) - sapply(mu, S)) / mean(data)) } )(observed) ratio <- function(mu1, mu2) (dprior(mu2) / dprior(mu1)) * (dtransition(mu2, mu1) / dtransition(mu1, mu2)) chain <- numeric(N) while (distance(chain[1] <- rprior(1)) > TOLERANCE) {} t <- 1; while (t < length(chain)) { proposal <- rtransition(chain[t]) if (distance(proposal) <= TOLERANCE) { probability <- min(1, ratio(chain[t], proposal)) if (runif(1) <= probability) { chain[t + 1] <- proposal t <- t + 1 } } } ( ratio) log
  • 32. µ
  • 34. . (with ABC ) .. 1 .. θ1 , . . . , θkN (k > 1) π(·) 2 .. θi D′i 3 .. ρ(S(D), S(D′ )) i 4 .. (1), . . . , (kN) {θ(1) , . . . , θ(N) } . ϵ = ρ(S(D), S(D′ )) (N)
  • 35. distance <- (function(data) function(mu) { S <- function(m) mean(rnorm(length(data), m, 5)) abs((mean(data) - sapply(mu, S)) / mean(data)) } )(observed) prior <- rprior(k * N) sortedDistance <- sort(distance(prior), index.return=TRUE) posterior <- prior[sortedDistance$ix[1:N]]
  • 36. µ
  • 38. CRAN abc →
  • 40. . .. . . .. ( ) .
  • 41. . .. . : 突然変異 現在 過去
  • 42. . .. a N k ( ) k(k − 1) EXP 2N a . ( )
  • 43. . .. POIS(Lµ) L ( ) µ .
  • 44. 現在 分化 過去 • ⇒ ⇒ •
  • 45. . .. 2 Hana mogeraa 2 b ( 2 ) • 1 N 400,000 • 2 rN 1 2 • aN 1 5 • (T; 4N ) 2 a b .
  • 46. 集団 1 2N 2aN 集団 2 2rN 0 T N ∼ U(0, 400000) r ∼ U(0, 2) a ∼ U(0, 5) T ∼ U(0, 2)
  • 47. 30 1 • 10−5 • 20 • S k (S1 , k1 , S2 , k2 ) = (15.4, 2.9, 8.9, 0.3) 1 (N, r, a, T) = (80000, 0.1, 3.0, 0.1)
  • 48.
  • 49.
  • 51. ´ [1] Marjoram P, Molitor J, Plagnol V, and Tavare S (2003) Markov chain Monte Carlo without likelihoods. PNAS, 100: 15324–15328. [2] (2001) . , 31: 305–344. [3] (2005) . , 12: II ( ) pp.153–211. [4] Robert CP (2010) MCMC and Likelihood-free Methods. SlideShare.