Electrocardiogram: Missed beats in presence of Ectopic beats or Premature Atrial/Ventricular Contraction beats
After developing and checking the algorithm with simulated ECG data, i found out that premature beats (as the name suggests) itself arrive prematurely i.e. their R-R peak interval is less then the R-R peak interval between normal beats.

In that case, i am considering the averaged interval between normal beats and compare it to the interval between next arriving beats. If that interval is more than twice the averaged normal interval, then i classify it as a missed beat.