Challenge

Supervised Learning - Classification Week 8 Challenge

Ans no 1:-

NN: K-Nearest Neighbors is a supervised machine learning algorithm that classifies a data point based on how its neighbors are classified. It classifies new cases based on feature similarity measures.

KNN algorithm

k in the KNN algorithm is a parameter that refers to the number of nearest neighbors to include in the majority voting process. It is important to choose the right value of k in order to attain high model accuracy and this is achieved by parameter tuning.

KNN is used for data that is labeled, small in size, and noise-free.

KNN algorithm calculates the distance between two points using the Euclidean formula.

It'll calculate the distance between the unknown data point and all the points in the dataset, and based on the distance value, it'll classify the data point.

Ans No 2:-

Pros:

  • It is a simple Machine Learning algorithm and easy to understand.
  • kNN can be used for classification and regression.
  • It can be used for multi-class problem.
  • It provides a variety of distance criteria to choose from: Euclidean Distance Hamming Distance Manhattan Distance Minkowski Distance

Cons:

  • It is difficult to choose the optimal number of neighbors to be consider while classifying the new data entry.
  • K-NN inherently has no capability of dealing with missing value problem.
  • k Nearest Neighbor has calculate the proximity between each neighbors for every single value in the dataset. For large daasets its computation cost increases.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.