Starting from:

$29.99

Assignment 3  Vanilla Gradient Descent

CSCI 362: Machine Learning Assignment 3
 Vanilla Gradient Descent

ˆ Download or cut-and-paste ols_tensor.py from our Github repo to your computer.
Please make sure that you have also downloaded the csv file containing the climate data.
ˆ The program ols_tensor.py uses gradient descent to train a linear model to fit the climate data.
Run the program to make sure your version executes correctly. Have a close look at the code. Notice
that the data are first mean-centered and normalized.
Also notice that the model found by gradient descent well approximates the one found using the
linear algebraic methods from Project 0.
ˆ Modify ols_tensor.py so that it mean-centers the climate data but does not normalize the climate
data. Note: you need only comment out two lines.
Run your program and observe that the weights of the model now blow up during training instead of
converging to the slope and intercept of the least-squares regression line.
ˆ Experiment with the learning rate and/or the number of epochs used for training the model.
Keep experimenting until you find learning parameters that lead again to high-quality convergence
(on our now mean-centered and not normalized data).
ˆ Submit a screenshot showing the output of a run of ols_tensor.py with the best learning parameters
that you found.

More products