You are on page 1of 8

TEAM MEMBERS: NITHISH.K, PRASANNA.

B ROLL NO: 2019108018, 2019108020

ANALYSIS OF COVID 19 USING LINEAR REGRESSION ALGORITHM

LINEAR REGRESSION:

Linear regression is one of the easiest and most popular Machine Learning algorithms. It is a
statistical method that is used for predictive analysis. Linear regression makes predictions for continuous/real
or numeric variables such as sales, salary, age, product price, etc.

Linear regression is also known as multiple regression, multivariate regression, ordinary least
squares (OLS), and regression. This case study will show you examples of linear regression, including an
example of simple linear regression using covid 19 time series data set.

LINEAR REGRESSION IN MACHINE LEARNING:

Linear Regression is a machine learning algorithm based on supervised learning. It performs a


regression task. Regression models a target prediction value based on independent variables. It is mostly used
for finding out the relationship between variables and forecasting.

Linear regression is one of the easiest and most popular Machine Learning algorithms. It is a statistical
method that is used for predictive analysis. Linear regression makes predictions for continuous/real or numeric
variables such as sales, salary, age, product price, etc.

ABSTRACT:

Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus. Most
of the people infected around the world. Now we have vaccines but also the death rates dose not comes to
zero. Our ultimate aim is to predict the covid cases using linear regression algorithm in Machine learning
and analyse the predicted values with actual one. By this we are able to find the confidence level of this
algorithm and also we are going to give a graphical representation for better understanding.

INTRODUCTION:

Machine learning helps computers to learn, without being programmed. Machine learning is
classified to two types, supervised learning and unsupervised learning. In supervised learning, new
examples are mapped by analysing input output relationship of the training data. Auto regression techniques,
SEIR models and seasonal periodic regression model are used to predict Covid-19 outbreaks. Suspected-
Infected-Recovered-Dead (SIRD) Model estimates epidemiological parameters like recovery and mortality
rates, reproduction number and infection. Also, long short-term memory and Gated Recurrent Unit using
Recurrent Neural Network has been used to predict recovered, negative cases, death cases and
confirmed cases.
In this paper, linear regression model is created using number of confirmed cases and number of
deaths. These models can help to predict the expected number of cases in the coming days.

MODEL:

Regression analysis has been used to understand the effect of Covid-19 on various Indian states.
India is a country where Initially Covid-19 infection was controlled through lockdown of entire country and
later by restricted lockdown. As the number of cases increased, depending on clusters lockdown is imposed.

CASE STUDY:

Cases in various states of India has been analysed in terms of confirmed cases, death cases and
recovered cases. Dataset has been taken from WHO website from 30-01-2020 to 11-08-2021. In this model
we are going to predict and analyse the data of Tamilnadu state.

CODING
Here we are using Jupyterlab for run and test our data to predict and analyse with original data.
1.IMPORTING LIBRARIES

We have to import some libraries in python for Machine learning. So that we are able to run the actual
data

2.READING THE FILE

We have to read the original data so that we are able to predict the cases.

3.PRINT THE DATA

After read that data, we have to print that data for better understanding.
4.PRINT THE STATES NAME

We have to show the states to choose the wanted one.

5.TAMILNADU DETAILS

After that we have to separate the Tamilnadu from that data and print it.

6.IMPORTING PLOTLY

We have to import plotly.This is used for plotting graph.


7.GRAPHICAL REPRESENTATION

Using plotly we have to represent the original data as a graph

8.ARRAY CONVERSION

Convert the data as a array for the upcoming processes.

9.GIVING LENGTH

Create two variables as train_size and test_size and give them length.

10.FUNCTION

Code a function for predicting the cases. This function will be our key for the analysing of data.
11.GIVING INPUT

Give input to the function by creating variable and also we have to give train and test for that
function. It will check the difference between actual value and predicted value and stored it in the data.

12.IMPORTING LINEAR REGRESSION

For analysing the data we have to import linear regression model. And we have to train that
algorithm.

13.TESTING THE ALGORITHM

Create a new variable and test the y variable.

14.ACTUAL AND PREDICTED VALUES

Create a new variable and give the appropriate function code for the representation of actual cases
and predicted cases. In the we will use flatten.
15.GRAPHICAL REPRESENTATION OF OUTPUT

Orange bar denotes the predicted one and blue bar denotes the actual one.

INFERENCE:

From that output graph we can clearly see that bot the actual and predicted one are almost same.
But also there is a very little bit difference. These differences are stored in X data and Y data with the help
of train and test. By using this model we can also predict the future corona cases by collecting the cases data
till today and predict the upcoming cases.
RESULT:
Thus we predict the covid cases of Tamilnadu from 30-01-2020 to 11-08-2021 and analyse it with
original data using linear regression algorithm in machine learning.

REFERENCE MATERIALS:

Covid19 data in India: covid_19_india.csv

Raw code file: .ipynb_checkpoints\code.ipynb

You might also like