I am trying to understand the following networkA has two children - B & C (aka common cause)All the variables are binary and can be either 0 or 1.In data values are missing only for some records. Only values that are missing are values A.How does the Expectation step looks like in this example? Is it P(A|B,C) and then calculating the counts for P(A = 0| B = 0, C=0) ? I am confused with this.How does the Maximization step looks like in this example?
Expectation Maximization Algorithm for simple naive Bayesian network
algorithms;machine learning;artificial intelligence;probability theory;bayesian statistics
I finally found the solutionExpectation step is as followsCalculate new probabilities of data points as follows P(A|B,C)which we break down to (P(A,B,C)/P(B,C) =(P(B|C,A) * P(C|A)*P(A)) / (sum of all P(B,C) for all A) =since A is known then B & C is independenttherefore(P(B|C,A) * P(C|A)*P(A)) / (sum of all P(B,C) for all A) =which we need to consider 3 binary variables, gives us 8 cases (2^3)lets say for A = 1, B = 0, C= 1(P(B=0|A=1) * P(C=1|A=1)*P(A=1)) /   ( (P(B=0|A=1) * P(C=1|A=1)*P(A=1)) + ( (P(B=0|A=0) * P(C=1|A=0)*P(A=0)) )=  P(A=1| B=0, C=1) = lets call it value val101we use this value (val101) to update probability of each unknown data point that has B= 0 and C = 1 and A = 1.Then update probability of each unknown data point where A=0, B=0 and C=1 with the (1-val101)we do that for possible combinations of A, B and C000001010011100101110111(I think this is already an M step - Maximization, but here it goes)To calculate parameter theta for P(A=0) we do the followingcount (sum of all probabilities) of each data point where A = 0 and we divide it by the original amount of data pointswe do the same for the A =1then we update conditional parametersto update parameter theta of P(B=1|A=0)we take a sum all the probabilities of all data points where A = 0 and B=1and we divide it by the count (sum all the probabilities) of probabilities of data points where A =0so its as follows#(A=0,B=1) / #(A=0)  = theta P(B=1|A=0)and we do that for all the conditional probabilities which are as followsP(B=1|A=0)P(B=0|A=0)P(C=1|A=0)P(C=0|A=0)P(B=1|A=1)P(B=0|A=1)P(C=1|A=1)P(C=0|A=1)then you are done