Supervised Learning - Classification Week 8 Challenge
Q1. Answer in Week_8_Challenges.py attached below.
Q2. K-Nearest Neighbours.
Pros:
- KNN is known for its simplicity, comprehensibility and scalability. Learning and implementation are extremely simple and intuitive.
- The calculation time is less.
- Predictive power is very high, which makes it effective and efficient.
- It has relatively high accuracy.
Cons:
- KNN can be expensive in determining K if the dataset is large. It requires more memory storage than an effective classifier or supervised learning algorithms.
- It is very sensitive to the data's scale and irrelevent features. Irrelevent or correlated features have a high impact and must be eliminated.
- The computation cost is quite high as each training example's distance is calculated.
- Typically difficult to handle high dimensionality.