Learning Class-Level Bayes Nets for Relational Data