SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
PRML 第 2 章
2.3.3-2.3.6 (pp.88-100)
藤原 由来 (@sky_y)
May 25, 2014
1/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
今回の内容
第 2 章 確率分布
• 2.1 二値変数
• 2.2 多値変数
• 2.3 ガウス分布
• 2.3.1 条件付きガウス分布
• 2.3.2 周辺ガウス分布
• 2.3.3 ガウス変数に対するベイズの定理
• 2.3.4 ガウス分布の最尤推定
• 2.3.5 逐次推定
• 2.3.6 ガウス分布に対するベイズ推論
2/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
2.3.3 ガウス変数に対するベイズの定理
3/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
前提と問題
前提
• あるガウス周辺分布 p(x)
• 平均が x の線形関数で、共分散は x と独立であるようなガウ
ス条件付き分布 p(y|x)
問題
• 周辺分布 p(y) と条件付き分布 p(x|y) を求める
4/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
(2.102) の準備
p(x) = N(x|µ, Λ−1
)
=
1
2πD/2
1
|Λ−1
|1/2
exp
{
−
1
2
(x − µ)T
Λ(x − µ)
}
p(y|x) = N(y|Ax + b, L−1
)
=
1
2πD/2
1
|L−1|1/2
exp
{
−
1
2
(x − Ax − b)T
L(x − Ax − b)
}
5/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
(2.102)
ln p(z) = ln p(x) + ln p(y|x)
= −
1
2
(x − µ)T
Λ(x − µ) −
1
2
(y − Ax − b)T
L(y − Ax − b)
+ const.
= −
1
2
{
xT
Λx − µT
Λx − xT
Λµ + µT
Λµ
}
−
1
2
{yT
Ly − xT
AT
Ly − bT
Ly
− yT
LAx + xT
AT
LAx + bT
LAx
− yT
Lb + xT
AT
Lb + bT
Lb} + const.
6/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
2.3.4 ガウス分布の最尤推定
7/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
2 次形式の微分
∂
∂x
xT
Ax = (A + AT
)x (1)
A が対称の場合
∂
∂x
xT
Ax = 2Ax (2)
8/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
2.3.5 逐次推定
9/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
図 2.10
θ
z
θ
f(θ)
10/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
図 2.11
µML
z
p(z|µ)
µ
11/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
2.3.6 ガウス分布に対するベイズ推論
12/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
問題設定 1: 分散が既知のとき、平均を推定する問題
問題設定
• 既知の分散 σ2
• 与えられた N 個の観測値集合 x = {x1, ..., xN }
このとき、平均 µ をベイズ推論によって推定したい。
13/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
演習 2.38
(2.139) の右辺を計算し、(2.140) を得る問題。
ポイント:
• 指数部分を次の形に整理する(平方完成):
−
1
2
1
σ2
N
{
µ2
− 2µN µ + const.
}
• (2.143) より
N∑
n=1
xn = NµML
• (おまけ)以下のようにすると分かりやすくなるかも:
N∑
n=1
x2
n = x2
14/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
図 2.12
N = 0
N = 1
N = 2
N = 10
−1 0 1
0
5
15/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
問題設定 2: 平均が既知のとき、精度(分散)を推定する問題
問題設定
• 既知の平均 µ
• 与えられた N 個の観測値集合 x = {x1, ..., xN }
このとき、精度 λ = 1/σ2 をベイズ推論によって推定したい。
16/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
図 2.13
λ
a = 0.1
b = 0.1
0 1 2
0
1
2
λ
a = 1
b = 1
0 1 2
0
1
2
λ
a = 4
b = 6
0 1 2
0
1
2
17/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
演習 2.41
ポイント:
• Gam(λ|a, b) を λ で積分する
• t = bλ とおく
18/19
2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論
演習 2.42
ポイント:
• t = bλ とおく
• ガンマ関数の定義を利用する:
Γ(a) =
∫ ∞
0
λa−1
exp(−λ)dλ
• ガンマ関数の性質:
Γ(a + 1) = aΓ(a)
19/19

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...
 

14.05.25 大阪PRML読書会 第2章 2.3.3-2.3.6 (pp.88-100)

  • 1. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 PRML 第 2 章 2.3.3-2.3.6 (pp.88-100) 藤原 由来 (@sky_y) May 25, 2014 1/19
  • 2. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 今回の内容 第 2 章 確率分布 • 2.1 二値変数 • 2.2 多値変数 • 2.3 ガウス分布 • 2.3.1 条件付きガウス分布 • 2.3.2 周辺ガウス分布 • 2.3.3 ガウス変数に対するベイズの定理 • 2.3.4 ガウス分布の最尤推定 • 2.3.5 逐次推定 • 2.3.6 ガウス分布に対するベイズ推論 2/19
  • 3. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 2.3.3 ガウス変数に対するベイズの定理 3/19
  • 4. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 前提と問題 前提 • あるガウス周辺分布 p(x) • 平均が x の線形関数で、共分散は x と独立であるようなガウ ス条件付き分布 p(y|x) 問題 • 周辺分布 p(y) と条件付き分布 p(x|y) を求める 4/19
  • 5. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 (2.102) の準備 p(x) = N(x|µ, Λ−1 ) = 1 2πD/2 1 |Λ−1 |1/2 exp { − 1 2 (x − µ)T Λ(x − µ) } p(y|x) = N(y|Ax + b, L−1 ) = 1 2πD/2 1 |L−1|1/2 exp { − 1 2 (x − Ax − b)T L(x − Ax − b) } 5/19
  • 6. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 (2.102) ln p(z) = ln p(x) + ln p(y|x) = − 1 2 (x − µ)T Λ(x − µ) − 1 2 (y − Ax − b)T L(y − Ax − b) + const. = − 1 2 { xT Λx − µT Λx − xT Λµ + µT Λµ } − 1 2 {yT Ly − xT AT Ly − bT Ly − yT LAx + xT AT LAx + bT LAx − yT Lb + xT AT Lb + bT Lb} + const. 6/19
  • 7. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 2.3.4 ガウス分布の最尤推定 7/19
  • 8. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 2 次形式の微分 ∂ ∂x xT Ax = (A + AT )x (1) A が対称の場合 ∂ ∂x xT Ax = 2Ax (2) 8/19
  • 9. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 2.3.5 逐次推定 9/19
  • 10. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 図 2.10 θ z θ f(θ) 10/19
  • 11. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 図 2.11 µML z p(z|µ) µ 11/19
  • 12. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 2.3.6 ガウス分布に対するベイズ推論 12/19
  • 13. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 問題設定 1: 分散が既知のとき、平均を推定する問題 問題設定 • 既知の分散 σ2 • 与えられた N 個の観測値集合 x = {x1, ..., xN } このとき、平均 µ をベイズ推論によって推定したい。 13/19
  • 14. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 演習 2.38 (2.139) の右辺を計算し、(2.140) を得る問題。 ポイント: • 指数部分を次の形に整理する(平方完成): − 1 2 1 σ2 N { µ2 − 2µN µ + const. } • (2.143) より N∑ n=1 xn = NµML • (おまけ)以下のようにすると分かりやすくなるかも: N∑ n=1 x2 n = x2 14/19
  • 15. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 図 2.12 N = 0 N = 1 N = 2 N = 10 −1 0 1 0 5 15/19
  • 16. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 問題設定 2: 平均が既知のとき、精度(分散)を推定する問題 問題設定 • 既知の平均 µ • 与えられた N 個の観測値集合 x = {x1, ..., xN } このとき、精度 λ = 1/σ2 をベイズ推論によって推定したい。 16/19
  • 17. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 図 2.13 λ a = 0.1 b = 0.1 0 1 2 0 1 2 λ a = 1 b = 1 0 1 2 0 1 2 λ a = 4 b = 6 0 1 2 0 1 2 17/19
  • 18. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 演習 2.41 ポイント: • Gam(λ|a, b) を λ で積分する • t = bλ とおく 18/19
  • 19. 2.3.3 ガウス変数に対するベイズの定理 2.3.4 ガウス分布の最尤推定 2.3.5 逐次推定 2.3.6 ガウス分布に対するベイズ推論 演習 2.42 ポイント: • t = bλ とおく • ガンマ関数の定義を利用する: Γ(a) = ∫ ∞ 0 λa−1 exp(−λ)dλ • ガンマ関数の性質: Γ(a + 1) = aΓ(a) 19/19