Programming Assignment 2
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:
PA2.zip
In PA2, only one Jupiter notebook file named Support_Vector_Machine.ipynb
is provided.
In the file, we will guide you through a series of exercises to implement SVM using cvxopt
package or SMO algorithm. They are two main parts of this assignment. Please pay attension to the hints, which are very important for the correct implementation of the algorithms.
The file contains both theoretical and programming questions. Please write your code by directly editing this file. Also use markdown
to answer theoretical questions in the file. If you are not familiar with markdown, please refer to a tutorial at https://jupyterbook.org/en/stable/content/math.html.
Please DO NOT directly import existing machine learning packages to solve the problem!
You are expected to use NumPy and CvxOpt packages only to implement the algorithms. Playing with different parameters could help you obtain more comprehensive answers to the algorithm. It is also useful to print the results of some intermediate variables.
How to Submit
Due date:November 8th
After finishing your assignment, you should pack all related files into one zip file.
Note that Support_Vector_Machine.ipynb
must be included. Upload your submission through THU's web learning page.