Challenge

Supervised Learning - Classification Week 8 Challenge

Q1. Answer in Week_8_Challenges.py attached below.

Q2. K-Nearest Neighbours.

Pros:

  1.  KNN is known for its simplicity, comprehensibility and scalability. Learning and implementation are extremely simple and intuitive.
  2. The calculation time is less.
  3. Predictive power is very high, which makes it effective and efficient.
  4. It has relatively high accuracy.

Cons:

  1. 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.
  2. It is very sensitive to the data's scale and irrelevent features. Irrelevent or correlated features have a high impact and must be eliminated.
  3. The computation cost is quite high as each training example's distance is calculated.
  4. Typically difficult to handle high dimensionality.
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.