该实验旨在探究学习率与梯度下降速度及效果的关系。
# Experiment 2: Multivariate Linear Regression
This is the report of Experiment 2: Multivariate Linear Regression.
# Purpose
In this experiment, we want to find the influence of learning rate() on convergence and gradient decent efficiency.
The value of inputs is the living area and the number of bedrooms, the outputs are the housing prices in Portland, Oregon.
# Hypothesis
We hypothesize that living area and the number of bedrooms () are linear independent with housing prices ().
# Procedure
Because I want to figure out the influence of learning rate(), I choose different , and draw the change of cost function in iterations. The cost function is defined as:
# Answer of the questions
# Question 5.1
I choose different to draw the picture. The results are like these:
I found that when the learning rate is too small, the convergence speed is too slow. For example, when , we can't find the minimum value of after iterations. When the learning rate is too large, it may be get the optimal in few iterations, but will not converge, but will keep oscillating around the minimum of .
# Question 5.2
I choose , after iterations,
Using that , the predicted price of a house with square feet and 3 bedrooms is .
# Question 6
With the formula , I got that
Using this , the predicted price of a house with square feet and 3 bedrooms is . The price didn't same, but the error is within the allowable range.