Machine learning for prognostic modelling electronic health records data