Cardiac arrhythmias are classified based on the morphology of the arrhythmia episode beats. Templates are formed using morphological features of the cardiac beats of the episode. The arrhythmia episode is classified as a monomorphic tachyarrhythmia or polymorphic tachyarrhythmia based on the one or more templates. The arrhythmia episode may be classified based on a number templates formed from the arrhythmia episode. The templates are formed by determining a measure of similarity between morphological features of a cardiac beat to a template. The similarities can be determined based on a pairing rule that determines which beat morphologies are compared. Selection of therapy for treating the arrhythmia episode may depend on the historical success of a therapy at mitigating previous arrhythmias of the same type as the arrhythmia episode.