๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Statistics/Probabilistic Graphical Model

๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ(Bayesian network) (2)

๋ณธ ํฌ์ŠคํŒ…์€ ์นด์ด์ŠคํŠธ ๋ฌธ์ผ์ฒ  ๊ต์ˆ˜๋‹˜์˜ ์ธ๊ณต์ง€๋Šฅ ๋ฐ ๊ธฐ๊ณ„ํ•™์Šต ๊ฐœ๋ก  2์˜ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ(Bayesian network) ๊ฐ•์˜ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•œ ๊ฒƒ์ด๋‹ค.

 

๋‹ค๋ฃฐ ๋‚ด์šฉ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

 

1. Factorization of Bayesian network

2. Conditional probability

3. Most probable assignment

4. Marginalization and elimination

5. Variable elimination

 

1. Factorization of Bayesian network

 

 

โ–ท ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ์˜ Factorization์€ Full joint distribution์„ ๊ตฌํ•  ๋•Œ, ๊ฐœ๋ณ„ ๋…ธ๋“œ์˜ Conditional probability์˜ Condition์— ํฌํ•จ๋˜๋Š” ๋…ธ๋“œ๋ฅผ ๊ฐ ๋…ธ๋“œ์˜ ๋ถ€๋ชจ ๋…ธ๋“œ๋งŒ์„ ๊ณ ๋ คํ•จ์œผ๋กœ์จ ๊ณ„์‚ฐ์— ์‚ฌ์šฉ๋˜๋Š” ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ค„์—ฌ์ฃผ๋Š” ์—ญํ• ์„ ํ•œ๋‹ค.

 

2. Conditional probability

 

 

โ–ท ์œ„์˜ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ๋กœ๋ถ€ํ„ฐ ๋„๋‘‘(Buglary)์ด ๋“ค๊ณ , ๋ฉ”๋ฆฌ์˜ ์ „ํ™”(MarryCalls)๊ฐ€ ์™”์„ ๋•Œ, ์•Œ๋žŒ์ด ์šธ๋ ธ์„ ํ™•๋ฅ ์„ ์–ด๋–ป๊ฒŒ ๊ตฌํ•  ์ˆ˜ ์žˆ์„๊นŒ? ์ด๋Ÿด ๊ฒฝ์šฐ์—๋Š” Conditional probability๋กœ๋ถ€ํ„ฐ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ท Hidden variable X๋ฅผ ๊ด€์‹ฌ ๋Œ€์ƒ์ธ Y์™€ ๊ด€์‹ฌ ๋Œ€์ƒ์ด ์•„๋‹Œ Z๋กœ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ๋‹ค. ์ด๋–„ Evidence๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ, Conditional probability๋ฅผ ๊ตฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ์œ„์˜ General form์˜ ์œ ๋„๊ณผ์ •์˜ ๋งˆ์ง€๋ง‰ ์‹๊ณผ ๊ฐ™์ด Full joint distribution์˜ ํ˜•ํƒœ๋กœ๋ถ€ํ„ฐ ๊ตฌํ•  ์ˆ˜ ์žˆ๋„๋ก  ์‹์„ ๋งŒ๋“ค์–ด ์ฃผ์–ด ๊ณ„์‚ฐํ•˜์—ฌ์•ผ ํ•œ๋‹ค. ์ฆ‰, Full joint distribution์˜ ํ˜•ํƒœ๋กœ ๋งŒ๋“  ์‹์—์„œ Marginalize out์„ ํ†ตํ•ด Conditional probability๋ฅผ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค.

 

3. Most probable assignment

 

 

โ–ท ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ๋ฅผ ์ด์šฉํ•˜๋ฉด Evidence๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ๊ฐ€์žฅ ์ผ์–ด๋‚  ๋งŒํ•œ ์‚ฌ๊ฑด์„ ๊ตฌํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋Š” ์•ž์˜ Conditional probability๋กœ๋ถ€ํ„ฐ ๊ฐ ์‚ฌ๊ฑด์— ๋Œ€ํ•œ ํ™•๋ฅ ์„ ๊ณ„์‚ฐํ•˜์—ฌ ๊ฐ€์žฅ ํฐ ์‚ฌ๊ฑด์„ ๊ตฌํ•จ์œผ๋กœ์จ ๋‹ตํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ท Most probable assignment๋ฅผ ํ†ตํ•ด ๋‘ ๊ฐ€์ง€ ์‘์šฉ์ด ๊ฐ€๋Šฅํ•œ๋ฐ, ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ ์˜ˆ์ธก์ด๋‹ค. Evidence๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ๊ฐ€์žฅ ๋†’์€ ํ™•๋ฅ ์„ ๊ฐ€์ง„ ์‚ฌ๊ฑด์„ ์˜ˆ์ธก ๊ฒฐ๊ณผ๋กœ ์ •ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•์€ ์ง„๋‹จ์ด๋‹ค. ๊ฒฐ๊ณผ๊ฐ€ ์ฃผ์–ด์กŒ์„ ๋•Œ, ๊ฐ€์žฅ ์ผ์–ด๋‚  ๋งŒํ•œ ์›์ธ์„ ๊ตฌํ•จ์œผ๋กœ์จ ๊ฒฐ๊ณผ์— ๋Œ€ํ•œ ์ง„๋‹จ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โ–ถ ์œ„์˜ ์ถ”๋ก  ๋ฌธ์ œ๋Š” ๋ณ‘์›์—์„œ์˜ ํ™˜์ž์˜ ์ •๋ณด๋ฅผ ์ด์šฉํ•œ ์ง„๋‹จ ๋˜๋Š” ๊ณต์žฅ ์„ค๋น„์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ†ตํ•ด ๊ณ ์žฅ์˜ ์›์ธ์„ ๋ฐํ˜€๋‚ด๋Š” ๋“ฑ์— ํ™œ์šฉ๋  ์ˆ˜ ์žˆ๋‹ค.

 

4. Marginalization and elimination

 

 

โ–ท ์œ„์˜ ๋ฒ ์ด์ง€์•ˆ ๋„คํŠธ์›Œํฌ์—์„œ P(a=true, b=true, mc=true)๋ฅผ ๊ณ„์‚ฐ์€ JC์™€ MC์— ๋Œ€ํ•˜์—ฌ Marginalize out์„ ํ†ตํ•ด ํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋•Œ, ๊ฐ ๋ณ€์ˆ˜์˜ Conditional probability๋กœ ๋ฐ”๊พธ์–ด ๋ฐ”๋กœ ๊ณ„์‚ฐํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ์†๋„๋ฅผ ๋” ๋น ๋ฅด๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ทธ๊ฒƒ์€ Marginalize out์˜ ๊ด€์‹ฌ ๋ณ€์ˆ˜๊ฐ€ ํฌํ•จ๋˜์ง€ ์•Š์€ Probability๋ฅผ Move around๋ฅผ ํ†ตํ•ด ๊ณ„์‚ฐ๋Ÿ‰์„ ์ค„์ด๋Š” ๊ฒƒ์ด๋‹ค. ์ฆ‰, ์Šฌ๋ผ์ด๋“œ ์•„๋ž˜์˜ ์‹๊ณผ ๊ฐ™์ด ๋งŒ๋“ค์–ด ์ฃผ๋Š” ๊ฒƒ์ด๋‹ค. ์ด๋Š” ๊ด€์‹ฌ ๋ณ€์ˆ˜๊ฐ€ ํฌํ•จ๋˜์ง€ ์•Š์€ Probability๊ฐ€ ๊ฐ ๋ณ€์ˆ˜์— ๋Œ€ํ•œ Summation ๊ณผ์ •์— ํฌํ•จ๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ์ „์ฒด ๊ณฑ์˜ ์—ฐ์‚ฐ๋Ÿ‰์„ ์ค„์–ด๋“ค์–ด ๋” ๋น ๋ฅด๊ฒŒ ๊ณ„์‚ฐํ•  ์ˆ˜ ์žˆ๋‹ค.

 

5. Variable elimination

 

 

โ–ท Variable elimination์€ ์„œ๋กœ ๋‹ค๋ฅธ ํ™•๋ฅ ์ด ๊ฐ™์€ ๋ณ€์ˆ˜์— ์ข…์†๋˜์–ด ์žˆ๊ณ , ํ•ด๋‹น ๋ณ€์ˆ˜์— ๋Œ€ํ•˜์—ฌ Marginalize out์„ ์ˆ˜ํ–‰ํ•  ๋•Œ, ๋‘ ํ™•๋ฅ ์˜ ํ…Œ์ด๋ธ”์„ ๊ณฑํ•˜์—ฌ ํ•˜๋‚˜์˜ ํ…Œ์ด๋ธ”๋กœ ๋งŒ๋“ค์–ด์ฃผ๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๊ณ„์‚ฐ๋Ÿ‰์„ ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค.

 

 

โ–ท ์œ„์˜ ์Šฌ๋ผ์ด๋“œ๋Š” ์•ž์˜ Variable elimination์„ ์ ์šฉํ•˜์—ฌ ๊ฐ ๋ณ€์ˆ˜์— ๋Œ€ํ•œ Summation์ด ๋๋‚  ๋•Œ๋งˆ๋‹ค ํ…Œ์ด๋ธ”์„ ํ•ฉ์ณ์„œ ๊ณ„์‚ฐ๋Ÿ‰์„ ์ค„์—ฌ๊ฐ€๋Š” ๊ณผ์ •์— ๋Œ€ํ•œ ๋‚ด์šฉ์ด๋‹ค. ์ˆ˜์‹๊ณผ ํ…Œ์ด๋ธ”์„ ํ†ตํ•ด ์ด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 


Reference:

"(๊ธฐ๊ณ„ ํ•™์Šต, Machine Learning) Week 7 Bayesian Network | Lecture 5 Factorization of Bayesian networks," AAILab Kaist, www.youtube.com/watch?v=uM652fjtqMA.

"(๊ธฐ๊ณ„ ํ•™์Šต, Machine Learning) Week 7 Bayesian Network | Lecture 6 Inference Question on B. Networks," AAILab Kaist, www.youtube.com/watch?v=frw8rxhfv8M.

"(๊ธฐ๊ณ„ ํ•™์Šต, Machine Learning) Week 7 Bayesian Network | Lecture 7 Variable Elimination," AAILab Kaist, www.youtube.com/watch?v=pZUwFRdMb0o.