bayesian network

22
Bayesian Network 2006 년 2 년년 년년년년 년년년 년년 년년 3 년년 년년년

Upload: mead

Post on 05-Jan-2016

68 views

Category:

Documents


2 download

DESCRIPTION

Bayesian Network. 2006 년 2 학기 지식기반 시스템 응용 석사 3 학기 송인지. Outline. Introduction Independent assumption Consistent probabilities Evaluating networks Conclusion. 당신이 병에 걸렸을 확률 ?. Introduction. 당신은 병이 있다는 판정을 받았다 . 이 검사의 오진율은 5% 이다 . 일반적으로 이 병에 걸릴 확률은 0.1% 이다. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Bayesian Network

Bayesian Network

2006 년 2 학기지식기반 시스템 응용

석사 3 학기 송인지

Page 2: Bayesian Network

2/21

Outline

Introduction Independent assumption Consistent probabilities Evaluating networks Conclusion

Page 3: Bayesian Network

3/21

당신이 병에 걸렸을 확률 ?

1. 당신은 병이 있다는 판정을 받았다 .2. 이 검사의 오진율은 5% 이다 .3. 일반적으로 이 병에 걸릴 확률은 0.1% 이다 .

1. P( 질병 | 질병판정 ) = ?2. P( 질병판정 | 질병 X) = 0.05, P( 질병 X 판정 | 질병 ) = 0.053. P( 질병 ) = 0.001

)(

)()|()|(

질병판정질병질병질병판정질병판정질병

P

PPP

%20196.00509.0

001.0

999.0*05.0001.0*95.0

001.0*1

))P(|()()|(

)()|(

XXPPP

PP

질병질병질병판정질병질병질병판정질병질병질병판정

1970 년대 : 미국의 병원 의사 80% 가 95% 라고 답

Introduction

Page 4: Bayesian Network

4/21

Disease-test Bayesian network

CausalRelationship

Introduction

Page 5: Bayesian Network

5/21

Bayesian Networks

변수 집합 사이에 확률적 관계를 표현한 graphical model 조건부 확률들에 기반한 결합 확률 분포의 간략한 표현

Qualitative parts: graph theory DAG Vertices: 변수들 Edges: dependency or influence

Quantitative part: probability theory 각 변수 Xi 와 그의 부모 Pa(Xi) 에 마다 , P(Xi|Pa(Xi)) 를 위한

조건부 확률 테이블

Introduction

Page 6: Bayesian Network

6/21

d-Connection & d-Sepeartion

증거 노드 E 에 대해 두 노드 q 와 r 사이의 path 가 d-connecting 이려면 , path 안의 각 내부 노드 n 이 다음과 같은 성질 중 하나를 충족1. Linear or diverging: n 의 어떤 노드도 E 안에 포함 X2. Converging: n 또는 그 하위 노드 중 하나라도 E 안에 포함

만약 두 노드 사이에 d-connecting path 가 없으면 , 두 노드는 d-seperated

Independence Assumption

Page 7: Bayesian Network

7/21

Question 1: Is BP dependent on FO?Independence Assumption

No! 만약 두 사건 사이에 아무 연관관계가 없지만 , 같은 사건의 원인이

된다면 , 두 사건은 독립

BN 은 원인 판별에 주로 사용됨 converging nodes 자주 사용됨

Converging NodeConverging Node

Page 8: Bayesian Network

8/21

Question 2: Is BP independent on FO?Independence Assumption

No! 두 노드 사이의 path 에 증거 노드가 존재하는 경우는 Q1 과

다름 BP 의 확률이 증가하면 FO 의 확률은 감소 가장 그럴 듯 한 원인을 원인 목록에서 제거하면 , 덜 그럴 듯

하던 원인이 조금 더 그럴 듯 해짐

EvidenceEvidence

Page 9: Bayesian Network

9/21

Nothing looks amiss?

P(a|b) = .7 P(b|a) = .3 P(b) = .5

Consistent Probability

만약 일부의 필요한 확률 값들만 정해 주면 , 전체 확률 테이블은 consistency 를 유지 유일하게 distribution 이 정의됨

BN 의 또 다른 장점 !

P(a) = P(b)P(b|a)/P(b|a) = .5 * .7 / .3 = 1.16 > 1

Page 10: Bayesian Network

10/21

Parameter saving in BN

Complete distribution for doubled FO : 2N-1 = 210-1 = 1023

Required value for doubled FO BN : 21

Consistent Probability

Page 11: Bayesian Network

11/21

Detailed explanation

To define a network Requires Joint distribution for all values

For set of boolean var (a,b): P(a,b), P(∼a, b), P(a, ∼b), P(∼a, ∼b)

For n boolean var: 2n-1 values

Requires the probability of every node given all possible combinations of its parent 각각의 joint distribution Chain rule

독립 가정 Chain rule 계산 쉬워짐 Marginal independence

A⊥B ⇔ P(A|B) = P(A), P(B|A) = P(B) Conditional independence

A⊥B|C ⇔ P(A|B,C) = P(A|C), P(B|A,C) = P(B|C)

Consistent Probability

Page 12: Bayesian Network

12/21

Inference tasks

Single Marginal: P(x) or P(x|y) Subjoint: P(x,y) All Marginal: P(x) for all x Arbitary subset of queries: {P(x,y), P(z)} Boolean: P(X^Y) MPE(Most Probable Explanation): Full JPD 에서 확률이 가장

높은 경우의 레이블 MAP(Maximum A posteriori Probability): Sub JPD 에서 확률이

가장 높은 경우의 레이블

Evaluating Networks

Page 13: Bayesian Network

13/21

Inference methods

Exact inference Factoring Variable elimination Junction tree

Approximate inference Simulation Search Model reduction

Evaluating Networks

Page 14: Bayesian Network

14/21

Exact inferenceEvaluating Networks

)(*)|(*

),|(*),,|(*

),,,|(,,,

CatPCatColdP

CatColdAllergyPCatColdAllergySneezeP

CatColdAllergySneezeScratchesPAllergySneezeCatScratches

Page 15: Bayesian Network

15/21

Factoring

단순한 greedy heuristics 을 일반적으로 적용 – 계산 량이 적은 것을 우선적으로 선택

Single-query tasks 에만 사용

Evaluating Networks

Page 16: Bayesian Network

16/21

Variable elimination

Query 에 포함되지 않은 변수들의 삭제 순서를 정하고 변수들을 삭제해가며 계산

삭제 순서 NP-Hard Approximation methods: Minimum deficiency ordering (Connection 이 가장

적은 노드 우선 삭제 ) Factoring 과 마찬가지로 Single Marginal Query 전용

Evaluating Networks

Page 17: Bayesian Network

17/21

Unified computational treeEvaluating Networks

Multiple query 를 위해 unified computational tree 를 구성

Page 18: Bayesian Network

18/21

Computation trees for P(Cold) & P(Cat)Evaluating Networks

Page 19: Bayesian Network

19/21

Information flows in merged computation

Evaluating Networks

Page 20: Bayesian Network

20/21

Junction treeEvaluating Networks

P(A)*P(B|A)*P(C|A)

모든 marginal task 를 위해 structure sharing 을 최대화 Tree 생성을 위해 elimination ordering 사용 Elegant! Simple! Well-understood! Efficient!

Page 21: Bayesian Network

21/21

Approximate inference

Simulation 무작위로 생성된 샘플들을 바탕으로 추측

Search 가장 큰 확률 값 몇 개만 계산에 이용

Model reduction 변수나 연결선의 개수를 줄이는 방법 등

Evaluating Networks

Searching exampleP(Cold=True) = .035/(.83+.035)= .04 ≒ .05 (True value)

Page 22: Bayesian Network

22/21

Conclusion

Knowledge base 의 간략한 확률적 표현 불확실하고 복잡한 문제에 주로 사용됨

Mobile intelligence & BN ?

Word-sense ambiguity

“She ordered a milk shake. She picked up the straw”