Using Machine Learning To Fight COVID-19 | Artificial Intelligence

Mysha Gilani
5 min readMar 1, 2021

114,677,616. This is the number of Coronavirus cases by February 28th, 2021. The Covid-19 virus has affected a total of 216 countries and territories across the globe. IT’S SCARY.

In this article, I will be going over yet another project that I have been working on. In this project, I use machine learning to create an ANN to predict whether or not one has Covid, The Flu, or a Cold.

Let’s do a little post-mortem…

First, we didn’t stop the spread early

Even though the pandemic is still underway, its catastrophic consequences have already been felt. We were not prepared, as we now know. I’m not prepared to deal with it or even learn about it. The most important issue caused by COVID-19 is that it spreads extremely rapidly. However, if we have less physical contact with one another, fewer people will become ill.

What would have happened if we stopped the spread earlier…

“… if China had implemented its control measures a week earlier, it could have prevented 67% of all cases there.” — Nature

Second, people can’t handle uncertainty

The uncertainty stems from a lack of knowledge of a situation. This has resulted in widespread hysteria, the purchase of a large amount of toilet paper, and people who can’t believe their eyes. It’s amazing how many times the same question is posed due to misinformation. One of the most significant is distinguishing between the flu, a cold, and COVID-19.

People are conflating these, and some are unknowingly taking the virus into public areas. We’re attempting to provide details based on a general response, but people exhibit various signs and symptoms due to the fact that we’re all special. You can’t reliably diagnose and treat people based on how they respond to others.

People must be conscious of what condition someone might be suffering from in order to isolate and delay the spread of the disease. Instead of comparing the flu with a bad cold, those who have the flu (which is also contagious) should get antiviral medication before it becomes fatal. People, on the other hand, are unable to think clearly due to high levels of anxiety and an abundance of unreliable or incomplete knowledge.

The Problem is the lack of data

We need a way to collect long-term data that informs us whether you have the flu, a cold, or COVID-19. Currently, all data contains individuals with the same condition that is entirely different. We’re not performing to our full potential.

Let me give you an example…

“It’s 2017, you’re the general manager of the Los Angeles Lakers and you need an All-Star who can win the championships for you. You start thinking about different positions. You start looking at data about the effectiveness of these different positions, how many points they score, rebounds they get. In conclusion, you find power forwards are the best, so you pick a power forward all-star.”

The only difference is in Sports, there is a plethora of data on individual players, but we can’t say the same for healthcare, which is way more important!

Now is the Data Collection Part!

With the rise of IoT devices, new ways to collect basic health data are becoming more popular. Apple watches have sensors that can track pulses. Salutem is a startup that is creating a simple IoT system that incorporates oximeters and temperature sensors to extend the possibilities of health data.

These are the aspects that I tracked…

  • Pulse
  • Blood Pressure (systolic and diastolic),
  • Temperature
  • Yes or no questions: do you have a headache
  • Sore Throat
  • Runny Nose

This data is easy to collect with IoT sensors and completes the task of representing the difference between flu, cold and COVID. In fact, people can collect this data with almost no equipment, aside for blood pressure.

Before we feed the data into our network, there are two main things we have to do:

Bias: There are a lot more days someone will be healthy than sick. So the model can just predict that you’re healthy every day because that will return the best accuracy

Normalization: The extremes of our data can throw off the model

To assess bias, the best option is to create additional sick data, based on previous days the patient was sick. This allows the model to gain more data to learn from and ensure it’s making accurate predictions.

The ANN

The best approach to this problem is using an ANN (Artificial Neural Network). ANNs are comprised of 3 or more layers (if you count the input layer):

Input Layer: Where all the data we collected gets inputted into an individual node

Hidden Layers: I used two hidden layers where calculations and functions are applied to inputs, and weights and biases are edited. The model may recognize that a cold is highly correlated with a runny nose, but COVID is mainly recognized by high temperature and sore throat. So the model will multiply the inputs by a number that helps it come to better predictions.

The output layer is our diagnosis. In the sick column: 0=healthy, 1=Cold, 2 = Flu, 3 = COVID.

This code is run and we are given our diagnosis!

Why is this important?

Minimizing those 103,151 deaths is a smart idea. People will be able to get care earlier rather than later until the seasonal flu has a major effect on the body. And, though controlling the spread of COVID is difficult now, what about the next pandemic?

To see my full code check out my GitHub: https://github.com/myshagilani/Personal_Diagnosis_For_Covid19/blob/main/MainCode

--

--