SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
PRML11.3
ギブスサンプリング∼スライスサンプリング
Yuki
11.3ギブスサンプリング 11.4スライスサンプリング
ギブスサンプリングとは
単純で適応範囲の広い
マルコフ連鎖モンテカルロアルゴリズム
であり
メトロポリスヘイスティング法の特別な場合
とみなすことができる
11.3ギブスサンプリング 11.4スライスサンプリング
サンプリングしたい確率分布 p(z) = p(z1, ...., zM )
マルコフ連鎖の初期状態を選択し
p(zi|zi) からサンプリング
から
条件付き分布
ある分布に従ってランダムに更新する
順番に更新する
z_iを
ギブスサンプリング概要
更新順序
11.3ギブスサンプリング 11.4スライスサンプリング
p(z1|z
(⌧)
2 , z
(⌧)
3 )
p(z2|z
(⌧+1)
1 , z
(⌧)
3 )
p(z3|z
(⌧+1)
1 , z
(⌧+1)
2 )
と更新しサンプル点を一つ得る
⌧
p(z1, z2, z3)
ステップ数
z
(⌧)
1 , z
(⌧)
2 , z
(⌧)
3値
z
(⌧+1)
1 をサンプルするから
から…
ex. 3変数分布の場合
サンプリングしたい分布
11.3ギブスサンプリング 11.4スライスサンプリング
一般的な場合
11.3ギブスサンプリング 11.4スライスサンプリング
この手続きが求めたい分布からのサンプルを生成することを示す
分布 p(z) がギブスサンプリングの
マルコフ連鎖全体でも不変である
p(zi|zi)
の値は変更されないのでzi
p(zi) は明らかに不変周辺分布
各ステップは定義により正しい条件付き分布
からサンプリングを行う。
これらの条件付き分布と周辺分布によって同時分布が指定され
るため、同時分布も不変である
からサンプリングするときこれは
ということから導かれる
p(zi|zi)
各ステップで不変であり
11.3ギブスサンプリング 11.4スライスサンプリング
ギブスサンプリングが正しい分布からのサンプリングを生成す
るために満たすべき2つ目の要求はエルゴート性
十分条件
条件付き分布分布の確率が0となる場合がないこと
マルコフ連鎖におけるエルゴート性
規約性::どの状態から出発しても、どの状態にも遷移する可能性がある
(周期性)状態i への回帰がk の倍数回のみに見られ、
しかもk がこの性質を持つ最大の数である場合
再帰性::状態iへ戻る確率が1
正再帰性::再帰性に加え状態iへ初めて戻る経過時間の平均が有限
非周期性::
11.3ギブスサンプリング 11.4スライスサンプリング
ギブスサンプリングの手続きを
Metropolis-Hastingsサンプリングの特別の場合として得ることができる
遷移確率 qk(z?
|z) = p(z?
k|zk)
z?
k
z?
k = zk
p(z) = p(zk|zk)p(zk)
受理確率
A(z?
, z) =
p(z?
)qk(z|z?
)
p(z)qk(z?|z)
=
p(z?
k|z?
k)p(z?
k)p(zk|z?
k)
p(zk|zk)p(zk)p(z?
k|zk)
= 1
詳細釣り合い条件と上記より
はこのステップでは変更されない
11.3ギブスサンプリング 11.4スライスサンプリング
二次元ガウス分布で考える
条件付き分布
周辺分布
サンプル点
典型的なステップサイズは
条件付き分布に支配されるので
のオーダーとなるl
状態はランダムウォーク
に従って発展するので
独立なサンプルを分布から
得るために必要なステップ数は
(Ll)2
のオーダーである
11.3ギブスサンプリング 11.4スライスサンプリング
過剰緩和(over-relaxation)
自己相関を減少させる方法
進行方向への移動を促進する
適応可能なもの
条件付き分布が
ガウス分布
p(zi|·)⇠N(µi, 2
) の場合条件付き分布が
z0
i = µi + ↵(zi µi) + i(1 ↵2
)1/2
⌫
とサンプル点が置き換えられる
N(⌫|0, 1)
1 < ↵ < 1
ex.)
任意のパラメータ
11.3ギブスサンプリング 11.4スライスサンプリング
↵ < 0 の時
ステップは平均と反対方向へバイアスがかかる。
の時↵ = 0
標準的なギブスサンプリングと等価
Neal, Radford M. (1995). Suppressing Random Walks in Markov Chain Monte Carlo Using Ordered Overrelaxation (Technical report).
11.3ギブスサンプリング 11.4スライスサンプリング
ギブスサンプリングが実際に適応可能かどうかは条件付き分布
からサンプルが容易に抽出できるかどうかに依存する。
対数凹なら適応棄却サンプリングを使おう
指数分布族かつ親子関係が共役を保存する
ならギブスサンプリング
11.3ギブスサンプリング 11.4スライスサンプリング
ICM
ギブスサンプリングアルゴリズムの各ステップ条件付き分布
からサンプルを抽出せず
条件付き分布の最大値で与えられる変数値の点推定を用いるなら
ICMアルゴリズが得られる
11.3ギブスサンプリング 11.4スライスサンプリング
ブロック化ギブスサンプリング
個々の変数ではなく変数のグループを
必ずしもブロック間でお互いに背反でない
変数のブロックを順に選択し
各ブロックの残りの変数で条件付けて
同時にサンプリングする
連続してサンプリングする
11.3ギブスサンプリング 11.4スライスサンプリング
スライスサンプリング
Metropolisアルゴリズムの難点
ステップサイズに敏感
ステップサイズを分布の形状から自動的に調整しよう
が評価できることが必要
正規化されていない分布
スライスサンプリング
˜p(z)
11.3ギブスサンプリング 11.4スライスサンプリング
目的は以下で与えられる分布
uの値は無視することでp(z)からサンプリングができる
これはuとzを交互にサンプリングすることで達成される
スライスサンプラー流れ
11.3ギブスサンプリング 11.4スライスサンプリング
1.
2.
3.
4.
5.実線
から一様に新しい をサンプリングする
˜p(z) を求める
0  µ  ˜p(z)
を固定µ
{z : ˜p(z) > µ}で定義される 分布のスライス
1.
2.
適当な の値が与えられる
3.
4.
z
z
から一様にuをサンプル
11.3ギブスサンプリング 11.4スライスサンプリング
4.がネック
分布のスライスから直接サンプリングするのは困難なことがあり
代わりに ˆp(z, µ)
を不変にするサンプルスキームを定義する
?これは詳細釣り合い条件が満たされることを保証することで達成される?
詳細釣り合いをどうしたらいいのかわかりませんでしたすみません
この次に説明するのが多分このスキームの話です
11.3ギブスサンプリング 11.4スライスサンプリング
サンプリングのスライスのインターバルをどう決めるか?
zmin  z  zmax
がサンプリングが非効率にならないように、
この領域がスライスの外に出ることをできるだけ少なくしたい
領域
にできるだけ多くのスライスを含むようにしたい
11.3ギブスサンプリング 11.4スライスサンプリング
幅 w の領域
a. 幅 w を定義する
b. を含む,z(⌧)
Author::Optimsmoose
z(⌧)
z0
z0
z(⌧)
c. 端点までインターバルを増加
d. スライスの外のサンプルを得る
e.得られたサンプル点をインターバルの端点とする
f. スライスに含まれるサンプル点が得られた
多変量化はギブスサンプリングのように
一変数づつ更新を行う
11.3ギブスサンプリング 11.4スライスサンプリング
GibbsSampling
2D Normal
p(x) = N(x|µ, ⌃)
2.97より
分散
二次元正規分布
多変量正規分布の条件付け確率は

Weitere ähnliche Inhalte

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Prml11.3~11.4