Supervised Learning - Classification Week 8 Challenge
1) Apply knn to the “Surface defects in stainless steel plates” and identify the differences.
The python File attached below
2) What are the pros and cons of knn.
Pros:
●Simple to understand and easy to implement.
•It is a non-parametric algorithm and hence, there are no assumptions.
•It can be used for classification as well as regression.
•There is flexibility for the user to select distance while building the model such as Euclidean Distance, Hamming
Distance, Manhattan Distance, Minkowski Distance.
Cons:
•Computationally expensive as it searches for nearest neighbors for the new data point during the prediction
stage.
•Memory intensive as it stores all the data points.
●Highly sensitive to outliers and its accuracy is impacted by noise or irrelevant data.