obtain network and fitted probabilities