Supervised Learning - Classification Week 8 Challenge
Ques1.
Attached in the file
Key Differences
| Feature | SVM | KNN |
|---|---|---|
| Training Time | High (especially for large data) | Low (lazy learner, no training) |
| Prediction Time | Fast | Slow (computes distances at runtime) |
| Sensitivity to Noise | High | High |
| Scalability | Poor for large datasets | Poor for large datasets |
| Parameter Tuning | C, gamma, kernel | k(number of neighbors), distance metric |
| Works well for | Complex but separable boundaries | Well-separated, low-dimensional data |
Ques2.
Pros of KNN:
Simple & intuitive
No training time
Works well with small datasets
Naturally handles multi-class problems
Cons of KNN:
Slow prediction for large datasets
Sensitive to irrelevant features & outliers
Needs proper feature scaling
Choosing optimal k is critical