Implementing Polynomial Regression in Python

Implementing Polynomial Regression in Python

The first step is to import our data into python. Locate WeatherDataP.csv and copy it into your local disc under a new file called ProjectData.

You can view the code used in this Episode here: **[SampleCode**](https://www.kaggle.com/mazennadirahmed/polynomial-regression-example)

Importing our Data

The first step is to import our data into python.

We can do that by going on the following link:Data

Click on “code” and download ZIP.

Locate WeatherDataP.csv and copy it into your local disc under a new file called ProjectData

Note: WeatherData.csv and WeahterDataM.csv were used in [Simple Linear Regression_](https://medium.com/ai-in-plain-english/linear-regression-in-python-part-1-simple-linear-regression-fae7672ff552) and [Multiple Linear Regression_](https://medium.com/ai-in-plain-english/implementing-multiple-linear-regression-in-python-1364fc03a5a8).

Now we are ready to import our data into our Notebook:

How to set up a new Notebook can be at the start of Episode 4.3

Note: Keep this medium post on a split screen so you can read and implement the code yourself.

## Import Pandas Library, used for data manipulation
## Import matplotlib, used to plot our data
## Import numpy for linear algebra operations
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
## Import our WeatherDataP.csv and store it in the variable rweather_data_p
weather_data_p = pd.read_csv("D:\ProjectData\WeatherDataP.csv")

## Display the data in the notebook
weather_data_p

Image for post

Plotting our Data

In order to check what kind of relationship Pressure forms with Humidity, we plot our two variables.

## Set our input x to Pressure, use [[]] to convert to 2D array suitable for model input
X = weather_data_p[["Pressure (millibars)"]]
y = weather_data_p.Humidity

## Produce a scatter graph of Humidity against Pressure
plt.scatter(X, y, c = "black")
plt.xlabel("Pressure (millibars)")
plt.ylabel("Humidity")

statistics machine-learning data-science data science

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Most popular Data Science and Machine Learning courses — July 2020

Most popular Data Science and Machine Learning courses — August 2020. This list was last updated in August 2020 — and will be updated regularly so as to keep it relevant

Statistics for Data Science

Statistics for Data Science and Machine Learning Engineer. I’ll try to teach you just enough to be dangerous, and pique your interest just enough that you’ll go off and learn more.

Difference between Machine Learning, Data Science, AI, Deep Learning, and Statistics

In this article, I clarify the various roles of the data scientist, and how data science compares and overlaps with related fields such as machine learning, deep learning, AI, statistics, IoT, operations research, and applied mathematics.

15 Machine Learning and Data Science Project Ideas with Datasets

Learning is a new fun in the field of Machine Learning and Data Science. In this article, we’ll be discussing 15 machine learning and data science projects.

Best Free Datasets for Data Science and Machine Learning Projects

This post will help you in finding different websites where you can easily get free Datasets to practice and develop projects in Data Science and Machine Learning.