1. A method of detecting a reference sequence of events in a sample sequence of events, wherein each event is of a certain event type and holds a set of data attributes, comprising the steps of: (a) picking candidate combinations of events from said sample sequence so that the event types within each candidate combination match the event types in the reference sequence, (b) calculating an overall similarity score for each candidate combination from at least (i) an event occurrence score based on occurrence deviations of the events of a candidate combination with respect to the matching events of the reference sequence and (ii) an attribute match score based on similarity deviations between the data attributes of the events of a candidate combination and the data attributes of the matching events of the reference sequence, and (c) identifying the candidate combination with the best overall similarity score as reference sequence detected.