1. A method comprising: receiving historical information of episodes, each episode including at least one sequence of events taken over a period of time; constructing event sets from the historical information, each of the event sets including at least one sequence of events; categorizing each event from the historical information with general event category labels and synthetic event category labels, a subset of the synthetic event category labels being broader than two or more of the general event category labels, at least a subset of the events having at least one general event category label and at least one synthetic event category label; learning an event metric on the events by using the general event category labels and the synthetic event category labels to perform dimensionality reduction to associate a vector with each event and to determine an angle between every two vectors, each general event category label and each synthetic event category label being assigned a separate dimension; determining an event set metric using distances between each pair of event sets using the event metric; deriving a sequence metric on the episodes to compute the distances between episodes, wherein the sequence metric obtaining a preferred match between two episodes with respect to a cost function describing a weighting for the event set metric; deriving a subsequence metric on the episodes to compute the distances between episodes, wherein the subsequence metric is a function of the event set metric on subsequences of each episode; grouping episodes into subgroups based on the distances obtained using the sequence metric and the subsequence metric; for at least one subgroup, generating a consensus sequence by finding a preferred sequence of events with respect to a function of the sequence metric and the subsequence metric between the preferred sequence and the episodes of the at least one subgroup; and generating a report indicating the consensus sequence.