Warning: Declaration of action_plugin_tablewidth::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /s/bach/b/class/cs545/public_html/fall16/lib/plugins/tablewidth/action.php on line 93
assignments:assignment5 [CS545 fall 2016]

User Tools

Site Tools


assignments:assignment5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
assignments:assignment5 [2015/10/31 09:36]
asa
assignments:assignment5 [2015/11/05 10:35]
asa
Line 34: Line 34:
 Run the L1-SVM on the datasets mentioned above.  ​ Run the L1-SVM on the datasets mentioned above.  ​
 In scikit-learn use ''​LinearSVC(penalty='​l1',​ dual=False)''​ to create one. In scikit-learn use ''​LinearSVC(penalty='​l1',​ dual=False)''​ to create one.
-How many features have non-zero weight vector coefficients? ​ (Note that you can obtain the weight vector of a trained SVM by looking at its ''​coef0''​ attribute+How many features have non-zero weight vector coefficients? ​ (Note that you can obtain the weight vector of a trained SVM by looking at its ''​coef0_''​ attribute.
-Compare the accuracy of an L1 SVM to an SVM that uses RFE to select relevant features.+
  
-Compare the accuracy of a regular ​L2 SVM trained on the features selected by the L1 SVM with the accuracy of an L2 SVM trained on all the features (compute accuracy using 5-fold cross-validation).+Compare the accuracy of the following approaches using cross-validation on the two datasets: 
 + 
 +   * L1 SVM 
 +   ​* ​L2 SVM trained on the features selected by the L1 SVM 
 +   ​* ​L2 SVM trained on all the features 
 +   * L2 SVM that uses RFE (with an L2-SVMto select relevant features; use the class ''​RFECV''​ which automatically selects the number of features.
  
 It has been argued in the literature that L1-SVMs often leads to solutions that are too sparse. ​ As a workaround, implement the following strategy: It has been argued in the literature that L1-SVMs often leads to solutions that are too sparse. ​ As a workaround, implement the following strategy:
Line 45: Line 49:
   * For each feature compute a score that is the number of sub-samples for which that feature yielded a non-zero score.   * For each feature compute a score that is the number of sub-samples for which that feature yielded a non-zero score.
  
 +In the next part of the assignment you will compare this approach to RFE and the Golub filter method that you implemented in part 1.
 ===== Part 3:  Method comparison ===== ===== Part 3:  Method comparison =====
  
Line 68: Line 72:
 ===== 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 the pdf of your report ​and python code 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).
 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. 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. 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.
assignments/assignment5.txt · Last modified: 2016/10/18 09:18 by asa