COS513: Foundations of Probabilistic Modeling