Learning Continuous Time Bayesian Networks