Challenge II: Linear Regression
We'll test the concepts learned so far by applying them in a linear regression example.
We'll cover the following...
We can consolidate our learning so far in a working example.
Since this course slightly favors machine or deep learning, we’ll practice with the ultimate 101 example: linear regression. In this challenge, you’ll build linear regression step-by-step.
Step 1: Regressor
Remember, linear regression fits the data point to a straight line:
As a starter, this part simply requires us to implement the regressor,
Press + to interact
def Regressor(W,b):def y_(x):#Please update the line below with correct equation for y_return 1return y_
Step 2: Loss function
The loss function for a single sample is:
...