This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
assignments:assignment5 [2015/11/02 13:33] asa |
assignments:assignment5 [2015/11/05 09:48] asa [Part 2: Embedded methods: L1 SVM] |
||
---|---|---|---|
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 an L1 SVM to an SVM that uses RFE to select relevant features. | ||