Bayesian Learning of Loglinear Models for Neural Connectivity