Learning and predicting with chain event graphs