Machine Learning: For the love of Heart

Masrur Alam Prem
IEEE SB KUET

--

Let me tell you a story. The story is about a doctor whose father had passed away several years ago, from prostate cancer. The doctor whom he used to consult, initially told him that he would be able to live for only two years more. The basis of this decision was the combination of experience that he gathered from confronting similar patients and also on the treatment options available at that time. The son, worried about his father then took matter into his own hands and started to play an active role by researching clinical trials and new treatment options. His goal was to find a treatment that could keep his dad and in general, people live longer. And, Who doesn’t want to save their loved ones! Right?

So the doctor started to collect relevant literature and develop an optimal plan along with his dad’s physician. In consequence, his father’s life expanded to nine years more.

When I first heard the story, I couldn’t believe it to be a true story, rather I got to learn that there is always a scope for improvement in any sector. In fact, if it comes down to healthcare, a plethora of things can be done and with proper plannings, life can get better, longer for weeks, months or years. Who knows!

Although cancer was mentioned in the above story, let’s talk about “Cardiovascular diseases” which has always been a buzzword in healthcare. As per the statistics, CVDs remain the leading death cause in the USA, responsible for 840,768 deaths (635,260 cardiac) in 2016. According to WHO, 17.9 million people die each year from CVDs which is 31% of all deaths worldwide.

Figure: The pie chart shows worldwide death due to various diseases and accidents. CVDs remain as one of the main causes of worldwide death

These make sense. But still there lies questions. How engineering and technology can be used to tackle this? Well, it goes without saying that technology is influencing life and medical science is not far from it. In fact, treatments are being touched by this and automation has gained much popularity in recent years. From robot-assisted surgeries to machine-based diagnosis, the medical profession is on the verge of a technological data-driven revolution.

So, research is going on to find automated detection systems to diagnose diseases. Especially heartbeat detection has gained a lot of recognition to find out if you are suffering from chronic heart problems. It does range from myocardial infarction to arrhythmia. But in this article, let’s stick to the topic of arrhythmia.

What is Arrhythmia?

Arrhythmia is the problem in the rhythm of your heartbeat. This means your heart beats too fast or too slow or in an irregular pattern. It happens sporadically in a person’s day-to-day life but can be a severe cause of death. More than 750,000 hospitalizations occur each year because of it. The condition contributes to an estimated 130,000 deaths each year. The death rate from arrhythmia as the primary or a contributing cause of death has been rising for more than two decades.

Figure: Arrhythmia can cause cardiac arrest and severe heart attack

There are some ways to test arrhythmia such as Holter monitor, treadmill testing and whatnot. But, the ECG signal is gaining much reliability to develop automatic detection of arrhythmia.

Figure: Holter device is used to monitor ECG heartbeat

ECG beats contain a lot of data, a lot more data than you can think . for example, if the ECG signal is monitored for 10 minutes, it contains about 10000 data within. This huge amount of data needs proper nurturing. It needs suitable maintenance. Moreover, to develop more accurate automated detection, the enormity of data really is handy.

But who is to ring the bell?

It’s machine learning.

The more data you need to work with, the more efficient models are to be developed. Machine learning algorithms gives you that access. It is extremely data-hungry and already working promisingly in many fields where engineering has its part. So big names such as Adobe, Facebook, Google, Baidu, etc. are using ML algorithms extensively in a wider range of applications and projects. The medical sector is not an exception. In fact, the advancements in electronic medical records have been remarkable and can provide useful information to doctors for patient care. But for making such smart machine a huge amount of data set is to be processed. Machine learning can do that for you. It can convert the analysis into clinical insights which can prove to be highly convenient for both doctors and patients.

Figure: Doctors interacting with automated facilities

Recently Google came into the headlines with a wonderful project of theirs. They have developed an ML algorithm to identify tumors. Stanford is working with an algorithm that detects skin cancer cells and a lot of things are going on the arena of medical technology involving ML algorithms.

So what about arrhythmia? What is in store for the care of your heartbeat?? Let’s try to get an insight into this.

State-of-the-art ECG Based Arrhythmia Detection:

Process

Let’s get a little deeper into the process. There are two things to be considered: The ECG signal and the machine learning classification algorithms.

The ECG:

Figure: A typical ECG signal

An ECG is a test by which hearts electrical activity is measured as a voltage. In the above figure, an ECG signal can be seen. It consists of the periodical sequence of P, Q, R, S, T waves and component-wise it has three parts: P wave, QRS complex and T wave. These parts contain the necessary information about the activity of the atria and ventricles and hence the data about your heart’s overall condition.

Now, let’s take you to the measurement section.

In a traditional machine of 12 leads with electrodes that are attached to the body measures the electrical signal and these are evaluated by electrodes in three directions(front to back, up and down, left to right).

Thus by observing the rhythm and speed, the movement of the signal is evaluated to detect problems such as arrhythmia. Among other things, an ECG can be used to measure the size and position of the heart chambers, the presence of any damage to the heart’s muscle cells or conduction system.

Figure: ECG machine with electrodes measuring the heart rhythm activity to produce ECG (here called EKG)

Machine learning algorithms:

Now, as you know the data, you must process these. Machine learning provides classification algorithms to do that. These algorithms usually extract the features of the heartbeats by assessing the waves such as the QRS complex mentioned above. As classification is a supervised learning process, the machine is trained already with input data (also called training data) given to it and it uses this learning and classifies the new observations. Here in arrhythmia detection, the new data is classified as either normal or abnormal Heartbeat.

Source: 446–455, Future Generation Computer Systems-86, 2018 (Elsevier Inc.)

In the above table, some well-known classifiers with the value of accuracy have been shown with the reference of a research paper. The whole dataset of ECG was divided into some parts such as training set to train the model, testing set to test and then whole data was used to measure the overall performance.

The development of ECG based heartbeat detection for identifying arrhythmia is not a new task. The scientists have been concerned about it for several years. After the involvement of machine learning, it has given a new dimension to biomedical scientists. SVM, CNN, Deep learning- these classification algorithms are giving new hopes every day. And so, research is on the increase. Just by a simple google search, you can find thousands of papers and research works concerning this specific topic.

There’s something more interesting to be informed. The “European society of cardiology” published an article on MAY, 2019. Artificial intelligence has been proved effective in selecting lethal arrhythmia patients and has predicted sudden death in heart failure patients for the first time. A new ML algorithm is behind all this.

I think you already got an idea about the whole issue. Every day, more promising techniques are being devised with a better precision index. Sometimes new models with new algorithms or sometimes existing models with improved accuracy are being exposed in the world of arrhythmia detection. The beauty of machine learning is that it is always in quest of transcending itself and we are being benefited in the meantime.

What to do in the future?

Machine learning in arrhythmia diagnosis is providing us the efficacy that we require. Still, there are some necessary future works that must be considered. These are to develop new models, improve existing models, embed ML algorithms in real-life ECG monitoring, involving physicians, adding more diverse data set and increasing accuracy is a must.

Technologies are being leveraged for a better tomorrow. And the start of machine learning is not that bad either. As engineers, we want to provide everyone with better facilities and we also wouldn’t want a single error in our machines that may cost us hundreds or even thousands of lives. So, the quest for perfection will always be there and we hope for a beautiful journey to a better future with better healthcare for all.

References:

1. https://www.healthcatalyst.com/clinical-applications-of-machine-learning-in-healthcare

2. https://www.sciencedaily.com/releases/2019/05/190513104505.htm

3. https://www.acc.org/latest-in-cardiology/ten-points-to-remember/2019/02/15/14/39/aha-2019-heart-disease-and-stroke-statistics

4. https://www.sciencedirect.com/science/article/pii/S0167739X17324548

--

--