Distributed Learning, Prediction And Detection In Probabilistic Graphs.