Correction of pacemaker mode switch episodes
Information about short Atrial Fibrillation episodes can be gathered from the diagnostic records of cardiac implantable electronic devices. The algorithms used to activate or deactivate the Atrial Model Switching (AMS) are computationally simple. AMS activations are generally reliable but AMS deactivations are not. Expectation-Maximization algorithms are used to estimate the parameters of a Markov model from an incomplete list of AMS activations and duration of episodes. Abnormal mode changes are detected and short episodes are joined into larger events. The files in episodes.zip contain two columns. The first one indicates the time activations in days and the second one indicates the durations in seconds (unknown durations are represented by the value 0) In order to process the data you must change the path to your data in the EM_mixed_data.py code.