9 - Apprentissage des paramètres / BN parameter learning
章节大纲
-
- Lecture : slides part II - 9-14 (complete data)
- Assignment
- Let's use the data and the network provided in the file example-parameter-learning-complete.xlsx (cf. below)
- The CPDs (conditional probability distributions) corresponding to this network are P(A), P(B|A), P(D), P(C | A, D).
- The contingency tables associated to these CPDs are N(A), N(B,A), N(D), N(C, A, D). Fill these tables by counting the number of corresponding events in the dataset.
- Maximum of likelihood : how can we estime
P(A) from N(A) ? P(D) from N(D) ? P(B|A) from N(B,A) ? P(C | A,D) from
N(C, A,D) ? What are the results ?
- Let's consider the following Dirichlet coefficient αA=[1 1], αD=[3 7], αBA=[1 1; 1 1], αCAD=[1 1 1 1; 1 1 1 1]. What are the CPDs estimation with Expectation a posteriori approach ?
- Lecture: slides part II - 15-17 (incomplete data)
- Assignment
- Let's use the data and the network provided in the file example-parameter-learning-incomplete.xlsx (cf. below)
- How many of the 50 lines of data will we consider by applying Complete Case Analysis approach ?
- If we now consider Available Case Analysis approach, how many lines will we consider for the estimation of P(A) ? P(D) ? P(B | A) ?
- EM algorithm :
- initialize the parameters by applying (by hand) Available Case Analysis approach
- use Genie to implement this network
- First E step :
- the first missing data is the first sample, with A=0, C=0, D=0 and B missing.
- use your Genie implementation to ask your actual network (initialized with ACA) what is P(B | A=0, C=0, D=0).
- what are the contingency tables impacted by this missing value ?
- if B surely observed and equal to 0, N(B=0) would be increased by 1. if B surely observed and equal to 1, N(B=1) would be increased by 1. Here B is missing, but we have an estimation of its probability, so N(B=0) and N(B=1) will be increased by the respective probability of P(B=0| A=0, C=0, D=0) and P(B=1| A=0, C=0, D=0). Same reasoning for N(A,B) where two values are impacted: N(A=0, B=0) and N(A,0, B=1).
- First M step : apply Maximum of Likelihood estimation to estimate one new version for each of your CPDs, and update your BN
- And officially, you can repeat this until convergence :-)
- Lecture : slides part II - 9-14 (complete data)