Generalized Iterative Proportional Fitting for Relational Models