Supervised Learning - Classification Week 8 Challenge
2)
Advantages of KNN:
-
Simple to understand and implement: KNN is a straightforward and easy-to-understand algorithm that is simple to implement.
-
Non-parametric: KNN is a non-parametric algorithm, which means it does not make any assumptions about the underlying data distribution.
-
No training phase: KNN does not require a training phase. It simply memorizes the entire training dataset, making it a lazy learner.
-
Works well with small datasets: KNN is particularly useful when working with small datasets as it can efficiently classify or regress data without needing large amounts of training data.
Disadvantages of KNN:
-
Computationally expensive: KNN can be computationally expensive when working with large datasets, as it requires a search of the entire dataset for each prediction.
-
Sensitivity to irrelevant features: KNN can be sensitive to irrelevant features in the dataset, which can affect its accuracy.
-
Curse of dimensionality: KNN can suffer from the curse of dimensionality, which is a phenomenon where the performance of the algorithm deteriorates as the number of features or dimensions in the dataset increases.
-
Need to choose the optimal value of K: KNN requires choosing the optimal value of K, which can be difficult and time-consuming, and can significantly affect the performance of the algorithm.