This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
assignments:assignment4 [2016/09/30 10:23] asa |
assignments:assignment4 [2016/10/03 10:01] asa [Part 3: Soft-margin SVM for separable data] |
||
---|---|---|---|
Line 5: | Line 5: | ||
Due: October 17th at 11:59pm | Due: October 17th at 11:59pm | ||
- | ===== Part 1: SVM with no bias term ===== | + | ==== Part 1: SVM with no bias term ==== |
Formulate a soft-margin SVM without the bias term, i.e. one where the discriminant function is equal to $\mathbf{w}^{T} \mathbf{x}$. | Formulate a soft-margin SVM without the bias term, i.e. one where the discriminant function is equal to $\mathbf{w}^{T} \mathbf{x}$. | ||
Line 17: | Line 17: | ||
* Consider the following statement: The set of all key support vectors is unique. Prove this, or show a counter-example. | * Consider the following statement: The set of all key support vectors is unique. Prove this, or show a counter-example. | ||
- | * Using the definition of key support vectors prove a tighter bound on the leave-one-out cross validation error: | + | * In class we argued that the fraction of examples that are support vectors provide a bound on the leave-one-out error. Using the definition of key support vectors prove a tighter bound on the leave-one-out cross validation error can be obtained: |
$$ | $$ | ||
E_{cv} \leq \frac{\textrm{number of key support vectors}}{N}, | E_{cv} \leq \frac{\textrm{number of key support vectors}}{N}, | ||
Line 24: | Line 24: | ||
- | ===== Part 3: Soft-margin SVM for separable data ===== | + | ==== Part 3: Soft-margin SVM for separable data ==== |
Suppose you are given a linearly separable dataset, and you are training the soft-margin SVM, which uses slack variables with the soft-margin constant $C$ set | Suppose you are given a linearly separable dataset, and you are training the soft-margin SVM, which uses slack variables with the soft-margin constant $C$ set | ||
- | with the soft margin constant $C$ set | ||
to some positive value. | to some positive value. | ||
Consider the following statement: | Consider the following statement: | ||
Line 38: | Line 37: | ||
Is this true or false? Explain! | Is this true or false? Explain! | ||
- | ===== Part 4: Using SVMs ===== | + | ==== Part 4: Using SVMs ==== |
The data for this question comes from a database called SCOP (structural | The data for this question comes from a database called SCOP (structural | ||
Line 110: | Line 109: | ||
===== Submission ===== | ===== Submission ===== | ||
- | Submit the pdf of your report via Canvas. Python code can be displayed in your report if it is succinct (not more than a page or two at the most) or submitted separately. The latex sample document shows how to display Python code in a latex document. Code needs to be there so we can make sure that you implemented the algorithms and data analysis methodology correctly. Canvas allows you to submit multiple files for an assignment, so DO NOT submit an archive file (tar, zip, etc). Canvas will only allow you to submit pdfs (.pdf extension) or python code (.py extension). | + | Submit your report via Canvas. Python code can be displayed in your report if it is short, and helps understand what you have done. The sample LaTex document provided in assignment 1 shows how to display Python code. Submit the Python code that was used to generate the results as a file called ''assignment3.py'' (you can split the code into several .py files; Canvas allows you to submit multiple files). Typing |
- | For this assignment there is a strict 8 page limit (not including references and code that is provided as an appendix). We will take off points for reports that go over the page limit. | + | |
- | In addition to the code snippets that you include in your report, make sure you provide complete code from which we can see exactly how your results were generated. | + | <code> |
+ | $ python assignment4.py | ||
+ | </code> | ||
+ | should generate all the tables/plots used in your report. | ||
+ | |||
+ | |||
===== Grading ===== | ===== Grading ===== |