<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Supervised Learning, Part 1
Step1:  Let's plot the data to see what it looks like
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
import matplotlib
matplotlib.style.use('ggplot')
%matplotlib inline
training_data = {
    'x': [0, 1, 2, 3],
    'y': [4, 7, 7, 8]
}
train_df = pd.DataFrame.from_dict(training_data)
train_df
Explanation: Supervised Learning, Part 1: Regression
What is Supervised Learning?
Supervised learning is the machine learning task of attempting to use a set of grouped examples known as training data, with each example comprising of two things: 
an input, which is a set of one or more features 
an output, which is commonly referred to as the label
to determine the mapping function that generalizes the relationship between the features and the label for each example.
Real estate websites like Zillow use houses that were recently sold to find out how features like square footage, number of rooms, neighborhood, etc., play a role in determining house prices
Spam filters learn how to determine which emails are likely spam by analyzing the contents of spam emails that have been previously tagged by users
The Two Types: Regression and Classification
In mathematical terms, supervised learning attempts to do this, given input $x$ and output $y$:
$$ h_\theta(x) = y $$
When $y$ is a continuous output variable, such as the price of a house, it is referred to as regression problem. When $y$ is a categorical variable, such as the type of animal, it is referred to as a classification problem.
Today we will go over linear regression, which is a linear approach for modeling the relationship between input variables to an output variable.
Linear Regression
Univariate Linear Regression
Let's start off with a linear regression problem with one input variable. Suppose we have the following training data:
End of explanation
train_df.plot(kind='scatter', x='x', y='y')
Explanation: Let's plot the data to see what it looks like:
End of explanation
<END_TASK>