Effective Learning of Probabilistic Models For Clinical Predictions From Longitudinal Data