# CS545 fall 2016

### Site Tools

assignments:assignment4

# Differences

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

 assignments:assignment4 [2016/10/05 11:41]asa [Part 3: Soft-margin SVM for separable data] assignments:assignment4 [2016/10/06 15:09]asa [Part 4: Using SVMs] Both sides previous revision Previous revision 2016/10/11 18:16 asa [Part 2: leave-one-out error for linearly separable data] 2016/10/06 15:09 asa [Part 4: Using SVMs] 2016/10/05 11:44 asa [Part 3: Soft-margin SVM for separable data] 2016/10/05 11:41 asa [Part 3: Soft-margin SVM for separable data] 2016/10/03 10:01 asa [Part 3: Soft-margin SVM for separable data] 2016/10/03 10:00 asa [Part 2: leave-one-out error for linearly separable data] 2016/09/30 11:26 asa [Submission] 2016/09/30 10:24 asa 2016/09/30 10:23 asa 2016/09/30 10:22 asa [Grading] 2016/09/30 10:17 asa [Assignment 4: Support Vector Machines] 2016/09/30 10:16 asa 2016/09/30 09:42 asa 2016/08/09 10:25 external edit2015/10/19 16:45 asa [Part 1: Activation functions] 2015/10/19 16:45 asa [Assignment 4: Neural networks] 2015/10/19 16:45 asa [Grading] 2015/10/16 09:54 asa 2015/10/15 14:11 asa 2015/10/15 14:10 asa 2015/10/15 12:34 asa 2015/10/15 12:31 asa 2015/10/15 10:55 asa 2013/10/21 08:51 asa 2013/10/20 16:39 asa 2013/10/20 15:30 asa [Part 1: ROC curves] 2013/10/20 15:29 asa created Next revision Previous revision 2016/10/11 18:16 asa [Part 2: leave-one-out error for linearly separable data] 2016/10/06 15:09 asa [Part 4: Using SVMs] 2016/10/05 11:44 asa [Part 3: Soft-margin SVM for separable data] 2016/10/05 11:41 asa [Part 3: Soft-margin SVM for separable data] 2016/10/03 10:01 asa [Part 3: Soft-margin SVM for separable data] 2016/10/03 10:00 asa [Part 2: leave-one-out error for linearly separable data] 2016/09/30 11:26 asa [Submission] 2016/09/30 10:24 asa 2016/09/30 10:23 asa 2016/09/30 10:22 asa [Grading] 2016/09/30 10:17 asa [Assignment 4: Support Vector Machines] 2016/09/30 10:16 asa 2016/09/30 09:42 asa 2016/08/09 10:25 external edit2015/10/19 16:45 asa [Part 1: Activation functions] 2015/10/19 16:45 asa [Assignment 4: Neural networks] 2015/10/19 16:45 asa [Grading] 2015/10/16 09:54 asa 2015/10/15 14:11 asa 2015/10/15 14:10 asa 2015/10/15 12:34 asa 2015/10/15 12:31 asa 2015/10/15 10:55 asa 2013/10/21 08:51 asa 2013/10/20 16:39 asa 2013/10/20 15:30 asa [Part 1: ROC curves] 2013/10/20 15:29 asa created Last revision Both sides next revision Line 30: Line 30: Consider the following statement: Consider the following statement: - Since increasing the $\xi_i$ can only increase the objective ​of the primal problem (which + Since increasing the $\xi_i$ can only increase the cost function ​of the primal problem (which - we are trying to minimize), at the solution to the primal problem, all the + we are trying to minimize), at the solution to the primal problem, i.e. the hyperplane that minimizes the primal cost function, all the training examples will have $\xi_i$ equal training examples will have $\xi_i$ equal to zero. to zero. Line 97: Line 97: Next, we will compare the accuracy of an SVM with a Gaussian kernel on the raw data with accuracy obtained when the data is normalized to be unit vectors (the values of the features of each example are divided by its norm). Next, we will compare the accuracy of an SVM with a Gaussian kernel on the raw data with accuracy obtained when the data is normalized to be unit vectors (the values of the features of each example are divided by its norm). This is different than standardization which operates at the level of individual features. ​ Normalizing to unit vectors is more appropriate for this dataset as it is sparse, i.e. most of the features are zero. This is different than standardization which operates at the level of individual features. ​ Normalizing to unit vectors is more appropriate for this dataset as it is sparse, i.e. most of the features are zero. - Perform your comparison by comparing the accuracy measured by the area under the ROC curve in five-fold cross validation. + Perform your comparison by comparing the accuracy measured by the area under the ROC curve in five-fold cross validation, where the classifier/kernel parameters are chosen ​by - The optimal values of kernel parameters should be measured by cross-validation, where the optimal SVM/kernel parameters are chosen using grid search on the training set of each fold. + by nested cross-validation,​ i.e. using grid search on the training set of each fold. Use the scikit-learn [[http://​scikit-learn.org/​stable/​tutorial/​statistical_inference/​model_selection.html Use the scikit-learn [[http://​scikit-learn.org/​stable/​tutorial/​statistical_inference/​model_selection.html | grid-search]] class for model selection. | grid-search]] class for model selection.