NPTEL Introduction to Machine Learning Week 4 Assignment Answers 2024
1.
Answer :- For Answer Click Here
2. Why do we normalize by ∥β∥ (the magnitude of the weight vector) in the SVM objective function?
- To ensure the margin is independent of the scale of β
- To minimize the computational complexity of the algorithm
- To prevent overfitting
- To ensure the bias term is always positive
Answer :- For Answer Click Here
Answer :- For Answer Click Here
Answer :-
5. Consider a polynomial kernel of degree d operating on p-dimensional input vectors. What is the dimension of the feature space induced by this kernel?
Answer :- For Answer Click Here
6. State True or False: For any given linearly separable data, for any initialization, both SVM and Perceptron will converge to the same solution
- True
- False
Answer :-
For Q7,8: Kindly download the modified version of Iris dataset from this link.
Available at: (https://goo.gl/vchhsd)
The dataset contains 150 points, and each input point has 4 features and belongs to one among three classes. Use the first 100 points as the training data and the remaining 50 as test data. In the following questions, to report accuracy, use the test dataset. You can round off the accuracy value to the nearest 2-decimal point number. (Note: Do not change the order of data points.)
7. Train a Linear perceptron classifier on the modified iris dataset. We recommend using sklearn. Use only the first two features for your model and report the best classification accuracy for l1 and l2 penalty terms.
- 0.91, 0.64
- 0.88, 0.71
- 0.71, 0.65
- 0.78, 0.64
Answer :-
8. Train a SVM classifier on the modified iris dataset. We recommend using sklearn. Use only the first three features. We encourage you to explore the impact of varying different hyperparameters of the model. Specifically try different kernels and the associated hyperparameters. As part of the assignment train models with the following set of hyperparameters RBF-kernel, gamma=0.5, one-vs-rest classifier, no-feature-normalization.
Try C=0.01,1,10. For the above set of hyperparameters, report the best classification accuracy.
- 0.98
- 0.88
- 0.99
- 0.92
Answer :- For Answer Click Here