I recently got some free time during the New year 2021, long weekend, and I was wondering what I can do other than watching movies and sleeping, to spend some productive time. I decided to search for some data related to covid19 on the internet and found a dataset that was interesting. I was also doing a course on Udemy called Machine Learning A-Z : Hands on Python & R in Data Science, so I decided to apply the algorithms that I learnt on the dataset and see some results.

After going through this blog, you will get an idea on how to leverage the sklearn libraries to build various non-linear regression algorithms. The intention of the blog is to throw light on how to apply the models to a dataset and not on the predictions.

The non linear regression algorithms I used are :

*Polynomial Regression**Support Vector Regression**Decision Tree Regression**Random Forest Regression*

The dataset I chose is from https://ourworldindata.org/coronavirus-source-data. It has a bunch of columns, 54 to be precise. In order to keep things simple, I decided to choose covid19 data from India alone. Also, in order to visualize the results, I kept it to 2 dimensions, that is I took number of days since 30/01/2020 to 01/01/2021 as the independent variable and new cases as the dependent variable.

There are a few steps which are common to all the algorithms. This includes importing the required libraries, importing the dataset, and assigning X (independent variable) and y (dependent variable).