Supervised Learning - Classification Week 8 Challenge
Q2)What are the pros and cons of knn
ANS:
PROS OF KNN:
- KNN is known for its simplicity, comprehensibility, and scalability. Learning and implementation are extremely simple and intuitive.
- It is easy to interpret. The mathematical computations are easy to comprehend and understand.
- The calculation time is less.
- Predictive power is very high, which makes it effective and efficient.
- KNN is very effective for large training sets.
- It is very useful for nonlinear data because this algorithm has no assumptions about data.
- It is a versatile algorithm as we can use it for classification and regression.
- It has relatively high accuracy.
CONS OF KNN:
- 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.
- In KNN, the prediction phase is slow for a larger dataset. The computation of accurate distances plays a big role in determining the algorithm’s accuracy.
- One of the major steps in KNN is determining the parameter K. Sometimes, it is unclear which type of distance to use and which feature will give the best result.
- It is very sensitive to the data’s scale and irrelevant features. Irrelevant 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.
- KNN is a lazy learning algorithm as it doesn’t learn from the training data; it simply memorizes it and then uses that data to classify the new input.
- Typically difficult to handle high dimensionality