A method of analysing cardiac data provided for example by an electrocardiogram (ECG), cardioverter defibrillator or capnography, comprises determining a property of the data e.g. a mean RR interval, determined over a particular context length selected based on the property, for instance around 230 beats. This is compared with a threshold to indicate a probability of the patient experiencing a cardiac event within a risk window, which may be a probability density distribution. The threshold may be determined by training classifiers to classify properties of multiple heartbeats using a machine learning algorithm. The method may enable preventative action to be taken, or may enable determination of periods during which increased patient monitoring would be beneficial. Also disclosed is a method of training a hybrid classifier by combining classifiers based upon a performance metric, such as accuracy, sensitivity, specificity or precision.