Provided is an implantable medical device for predicting and treating electrical disturbances in tissue. The medical device includes an implantable telemetry unit (ITU), and an implantable leads assembly including a first and a second electrode implanted in the tissue. A processor of the ITU is configured to perform training by receiving electrical signals input to the electrode circuit, parsing the electrical signals into dynamic event states using Bayesian Non-Parametric Markov Switching, and modeling each event state as a multi-dimensional probability distribution. The processor of the ITU is further configured to perform analysis of the electrical signals and therapy to the tissue by applying other electrical signals to the multi-dimensional distribution to predict future electrical disturbances in the tissue, and controlling the electrode circuit to apply an electrical therapy signal to the first and second electrodes to mitigate effects of the future electrical disturbances in the tissue.
Real-time seizure prediction informed by hidden markov model event states