There are three ways you can us this work.
- Do marginal inference on nodes, when none of the nodes is observed
- Do marginal inference on nodes, when some of the nodes are observed
- Do Expectation Maximization on the Conditional Probability Distribution when one node is hidden.
Node Names:
- G -> Grade of a Student
- D -> Difficulty of the course
- I -> Intelligence of the Student
- S -> SAT score of the Student
- R -> Nature of Recommendation Letter
The graph implemented for Case 1, and Case 2:
The graph implemented for Case 3:
The grey node is the hidden node, the yellow nodes are observable.
The virtual data is located in /data/virtual_data.csv
python marginal_inference.py
python expectation_maximizer.py
-
This work does not handle, at present, the case when many nodes are hidden, as then sum-product algorithm won't work in case of dependence of hidden variables. The belief propogation algorithm is run by sum-product engine, so it handles the case when one node is hidden.
-
At present, the data_distribution.py library, is hardcoded for the graph used in example for expectation_maximizer.py. However you can change it to use it in new graphs. I will definitely get back to this, and correct it once my finals are over.