1 / 21

KNN Algorithm using Python | How KNN Algorithm works | Python Data Science Training | Edureka

** Python for Data Science: https://www.edureka.co/python ** <br>This Edureka tutorial on KNN Algorithm will help you to build your base by covering the theoretical, mathematical and implementation part of the KNN algorithm in Python. Topics covered under this tutorial includes: <br><br>1. What is KNN Algorithm? <br>2. Industrial Use case of KNN Algorithm <br>3. How things are predicted using KNN Algorithm <br>4. How to choose the value of K? <br>5. KNN Algorithm Using Python <br>6. Implementation of KNN Algorithm from scratch <br><br>Check out our playlist: http://bit.ly/2taym8X

EdurekaIN
Download Presentation

KNN Algorithm using Python | How KNN Algorithm works | Python Data Science Training | Edureka

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  2. KNN Algorithm Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  3. Agenda for Today’s Session ▪ What is KNN Algorithm? ▪ Industrial Use case of KNN Algorithm ▪ How things are predicted using KNN Algorithm ▪ How to choose the value of K? ▪ KNN Algorithm Using Python ▪ Implementation of KNN Algorithm from scratch ▪ Compare the built model using scikit learn Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  4. “K Nearest Neighbour is a simple algorithm that stores all the available cases and classifies the new data or What is KNN Algorithm? case based on a similarity measure.”

  5. K = Number of Nearest Neighbors What is K in KNN Algorithm?

  6. Industrial Application of KNN Algorithm Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  7. Industrial Application of KNN Algorithm Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  8. How does a KNN Algorithm work? CLASS A CLASS B

  9. How does a KNN Algorithm work? CLASS A CLASS B

  10. How does a KNN Algorithm work? CLASS A CLASS B K= 3

  11. How does a KNN Algorithm work? CLASS A CLASS B K= 6

  12. How to choose the value of K

  13. Euclidean Distance How things are predicted using KNN Algorithm?

  14. Manhattan Distance How things are predicted using KNN Algorithm?

  15. Manhattan Distance vs Euclidean Distance How things are predicted using KNN Algorithm?

  16. Why KNN Algorithm is a ?

  17. Let’s learn to DEMO code Copyright © 2017, edureka and/or its affiliates. All rights reserved. © MadeByShape Ltd. Web Design Manchester 2018. All Rights Reserved.

  18. Iris Dataset

  19. KNN: Step by Step Accuracy Response Generate a response from a set of data instance Summarizing the accuracy of predictions. Neighbors Locate k most similar data instances Main Tie it all together Handle Data Open the dataset from CSV and split into test/train datasets. Similarity Calculate the distance between two data instances Copyright © 2017, edureka and/or its affiliates. All rights reserved.

  20. Copyright © 2017, edureka and/or its affiliates. All rights reserved.

More Related