Log Linear Models for Prediction and Analysis of Networks