The present disclosure is directed to the classification of cardiac episodes using an algorithm. In various examples, an episode classification algorithm evaluates electrogram signal data to determine whether T-wave oversensing has occurred. The T-wave oversensing analysis may include, for example, identifying beat runs within the cardiac episode whether the beats within the run have at least one characteristic that alternates beat to be or clustering beats within the cardiac episode based on beat to beat interval length. The T-wave oversensing determination may be based on probabilistic analysis in some examples.