Programming Assignment 1
Policies
- Acknowledgment: We expect you to make an honest effort to solve the problems individually. As we sometimes reuse problem set questions from previous years, covered by papers and web pages, we expect you NOT to copy, refer to, or look at the solutions in preparing your answers (relating to unauthorized material is considered a violation of the honor principle). Similarly, we expect you not to google directly for answers (though you are free to google for knowledge about the topic). If you do happen to use other material, it must be acknowledged in your submission.
- Required homework submission format: You should directly write your codes and answers in the attached Jupiter notebook files. Pay attention to the comments and instructions to see which parts need to be changed exactly. The teaching assistant will grade your assignment mainly based on the correctness of your programming implementation and the rationality of your analytical answers.
- Collaborators: If you collaborated with others on any questions, list the questions and names of collaborators. Even if you acknowledge your collaborators, your solution should be written completely using your own words. For a record, we will run the plagiarism detection algorithm to compare codes with others. Any deeds of plagiarism will not be tolerated and will be reported to the student office of SIGS.
Problem Description
Download: PA1.zip
In PA1, two Jupiter notebook files named linear_regression_methods.ipynb
and Pandemic_data_analysis.ipynb
are provided. And italy.mat
is the pandemic dataset used in our program assignment.
In the first file, we will guide you through a series of exercises to implement linear regression using gradient descent and batch normalization, ridge regression and locally weighted regression. In the second file, you will apply your implemented algorithms on a regression problem using real-world pandemic data.
Please write your code and answers by directly editing these two files. We recommend you complete the linear_regression_methods.ipynb
first. And if you have trouble setting up Jupiter notebook, ask TA (17721051390@163.com) for help.
Please DO NOT directly import existing machine learning packages to solve the problem!
You are expected to use NumPy packages only to implement the algorithms. Playing with different parameters could help you obtain more comprehensive answers to the analytical questions. Visualizations are also helpful.
How to Submit
After finishing your assignment, you should pack all related files into one zip file.
Note that linear_regression_methods.ipynb
and Pandemic_data_analysis.ipynb
must be included. Upload your submission through THU's web learning page.