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

Sdílet
Vložit
  • čas přidán 10. 07. 2018
  • ** Python for Data Science: www.edureka.co/data-science-p... **
    This Edureka video 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 video includes:
    1. What is KNN Algorithm?
    2. Industrial Use case of KNN Algorithm
    3. How things are predicted using KNN Algorithm
    4. How to choose the value of K?
    5. KNN Algorithm Using Python
    6. Implementation of KNN Algorithm from scratch
    Check out our playlist for more videos: bit.ly/2taym8X
    Subscribe to our channel to get video updates. Hit the subscribe button above.
    #KNNAlgorithm #MachineLearningUsingPython #MachineLearningTraining
    How it Works?
    1. This is a 5 Week Instructor led Online Course,40 hours of assignment and 20 hours of project work
    2. We have a 24x7 One-on-One LIVE Technical Support to help you with any problems you might face or any clarifications you may require during the course.
    3. At the end of the training you will be working on a real time project for which we will provide you a Grade and a Verifiable Certificate!
    - - - - - - - - - - - - - - - - -
    About the Course
    Edureka’s Machine Learning Course using Python is designed to make you grab the concepts of Machine Learning. The Machine Learning training will provide deep understanding of Machine Learning and its mechanism. As a Data Scientist, you will be learning the importance of Machine Learning and its implementation in python programming language. Furthermore, you will be taught Reinforcement Learning which in turn is an important aspect of Artificial Intelligence. You will be able to automate real life scenarios using Machine Learning Algorithms. Towards the end of the course, we will be discussing various practical use cases of Machine Learning in python programming language to enhance your learning experience.
    After completing this Machine Learning Certification Training using Python, you should be able to:
    Gain insight into the 'Roles' played by a Machine Learning Engineer
    Automate data analysis using python
    Describe Machine Learning
    Work with real-time data
    Learn tools and techniques for predictive modeling
    Discuss Machine Learning algorithms and their implementation
    Validate Machine Learning algorithms
    Explain Time Series and it’s related concepts
    Gain expertise to handle business in future, living the present
    - - - - - - - - - - - - - - - - - - -
    Why learn Machine Learning with Python?
    Data Science is a set of techniques that enables the computers to learn the desired behavior from data without explicitly being programmed. It employs techniques and theories drawn from many fields within the broad areas of mathematics, statistics, information science, and computer science. This course exposes you to different classes of machine learning algorithms like supervised, unsupervised and reinforcement algorithms. This course imparts you the necessary skills like data pre-processing, dimensional reduction, model evaluation and also exposes you to different machine learning algorithms like regression, clustering, decision trees, random forest, Naive Bayes and Q-Learning.
    For more information, Please write back to us at sales@edureka.co or call us at IND: 9606058406 / US: 18338555775 (toll free).
    Instagram: / edureka_learning
    Facebook: / edurekain
    Twitter: / edurekain
    LinkedIn: / edureka

Komentáře • 70

  • @edurekaIN
    @edurekaIN  Před 6 lety +7

    Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Edureka Python Machine Learning Course curriculum, Visit our Website: bit.ly/2OpzQWw

  • @kwea123
    @kwea123 Před 6 lety +43

    can't imagine data processing without pandas,numpy but with for loops..

  • @rezamind5708
    @rezamind5708 Před 5 lety +22

    hello and thanks for ur hard work...wish you'd explained the codes alittle bit.

  • @jindagi_ka_safar
    @jindagi_ka_safar Před 5 lety +4

    Great, it was magical! thanks

  • @buzzfeedRED
    @buzzfeedRED Před 4 lety +1

    best explanation i found on the internet till date

  • @dipannita7436
    @dipannita7436 Před 3 lety

    Thanks ....got the concept

  • @shumailahmad7560
    @shumailahmad7560 Před 5 lety

    thanks for such a superb explanation

  • @hemantdhoundiyal1327
    @hemantdhoundiyal1327 Před 4 lety +29

    Explanation of theory was superb..
    Sir, plz try to explain coding as well.
    Overall good session.

    • @edurekaIN
      @edurekaIN  Před 4 lety +4

      Thank you for appreciating our efforts. We will definitely look into your suggestions. Do subscribe to our channel and stay connected with us. Cheers :)

  • @shrinivaskane5610
    @shrinivaskane5610 Před 5 lety +2

    Excellent video and superb explanation. Could you please share the source code?

  • @gowthamt7955
    @gowthamt7955 Před 4 lety

    Well explained!

  • @vivekjalankar6647
    @vivekjalankar6647 Před 3 lety +1

    Great video it helps a lot

  • @jeevanraajan3238
    @jeevanraajan3238 Před 5 lety +2

    Thanks a ton..Reallly good video :-)

    • @edurekaIN
      @edurekaIN  Před 5 lety +1

      Thanks for the compliment Jeevan! We are glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @deenquotes786
    @deenquotes786 Před 5 lety +1

    very good explaination

  • @alikayadibi9227
    @alikayadibi9227 Před 4 lety +1

    realy nice. nice job

  • @tanushreenagar3116
    @tanushreenagar3116 Před 3 lety +1

    Too nice thnk u

  • @shlokdoshi7162
    @shlokdoshi7162 Před 2 lety

    If a give an input list for the KNN algorithm to predict the classes of each element, How can I print out the list of inputs only belonging to a particular class?

  • @nehabindle3194
    @nehabindle3194 Před 5 lety +1

    Ho..is it possible to get this code

  • @shashibisht6878
    @shashibisht6878 Před 5 lety +1

    Really helpful video.Thanks!!
    Do u know how to do predictions on yearly data in python. Which method will be appropriate for this?

    • @edurekaIN
      @edurekaIN  Před 5 lety +3

      Thanks for appreciating our efforts! Time Series will be appropriate for this.

    • @shashibisht6878
      @shashibisht6878 Před 5 lety

      @@edurekaIN thanks

  • @jakirajam
    @jakirajam Před 5 lety

    what a great explanation about KNN. I like your explanation..Really helpful to beginners . Thanks

  • @hadibuxmahessar
    @hadibuxmahessar Před 3 lety +1

    thank you

  • @arkot5458
    @arkot5458 Před 4 lety +1

    It would be better to include few important steps like cross-validation, standardization of data and in the end touch some base on optimum K (error rate vs k -value). Just 2 cents. Other wise good job.

    • @edurekaIN
      @edurekaIN  Před 4 lety +2

      We try to show the most optimal executions and make sure that everyone is able to understand it efficiently. We will make sure that next time, we include this and give some more detailed explanation. Thank you.

  • @NitinGuptalko
    @NitinGuptalko Před 6 lety +13

    very good content and explanation. it will be good if you talk little slow. will be easy to understand.

    • @edurekaIN
      @edurekaIN  Před 6 lety

      Hey Nitin, glad to hear you loved our content. Thanks for the feedback, we will keep that in mind in the future. Do subscribe to our channel to never miss an update from edureka. Thanks! :)

  • @chandu2345
    @chandu2345 Před 2 lety +1

    Super sir

  • @roysoumya2
    @roysoumya2 Před 5 lety

    At 12:43 in loadDataset method, in the line (for y in range(4)). Why have you used the value 4 ? What is its significance ?

    • @edurekaIN
      @edurekaIN  Před 4 lety

      Hi Soumya, for every element present in x, there will be four iterations.

  • @jdharmendar
    @jdharmendar Před 5 lety

    I am extremely happy with this excellent presentation. Thank you.

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hey j dharmendar, we are glad you loved the video. Do subscribe and hit the bell icon to never miss an update from us in the future. Cheers!

  • @airbornetroops1
    @airbornetroops1 Před 6 lety +3

    Dear Edureka team
    Also please provide a KNN algorithm in R session online video

    • @edurekaIN
      @edurekaIN  Před 6 lety +1

      Hey Airbornetroops, we will definitely look into your suggestions. Do subscribe and stay tuned to any updates on our channel. Cheers :)

  • @rohanghorpade0878
    @rohanghorpade0878 Před 5 lety +1

    it was supeb explanation

  • @GurjantSingh-if9ty
    @GurjantSingh-if9ty Před 5 lety

    How to optimize knn algorithm to get more accuracy?

    • @edurekaIN
      @edurekaIN  Před 5 lety +3

      Hey Gujrant, simplest solution is to use K-Fold Cross Validation or using the technique of bootstrapping. Hope this helps!

  • @riyamathew2184
    @riyamathew2184 Před 4 lety

    Sir,
    Your video is really informative....

  • @vkd9442
    @vkd9442 Před 5 lety +1

    Hi sir.. Nice explanation.. But i wonder with libraries available in scikitlearn and pandas y dont u code with them and show.. As anyways we will not be using these lengthy codes in real time..

    • @edurekaIN
      @edurekaIN  Před 5 lety +1

      Hi Krishna, thanks for the compliment. We do have other videos on scikitlearn and pandas. This video is specifically about understanding the KNN algorithm concept. So, we have used the complex code to explain that.

  • @shubhambaswan765
    @shubhambaswan765 Před 4 lety

    How do we choose the optimum value of K

    • @edurekaIN
      @edurekaIN  Před 4 lety +3

      The optimum K will always vary depending on your data-set. It should be as big that noises won't affect the prediction highly. And as low that one factor won't dominate another. Some claim that the square root of n is a good number. But, I think the best method is to try many K values and use Cross-Validation to see which K value is giving the best result.

  • @quieterankwe2502
    @quieterankwe2502 Před 4 lety

    now how would I plot the data?

    • @edurekaIN
      @edurekaIN  Před 4 lety

      You can make use of seaborn functions to plot this data. For a complete Seaborn tutorial, you can follow the link: bit.ly/34u41mG

  • @Vikash07857
    @Vikash07857 Před 5 lety

    How do we take k value randomly?

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hey Vikash, "The simplest solution is probably K-Fold Cross Validation.en.wikipedia.org/wiki/Cross-validation_(statistics)#K-fold_cross-validation
      An alternative, widely used technique is bootstrapping. The choice of K equal to the square root of the number of instances is an empirical rule-of-thumb popularized by the ""Pattern Classification"" book , it is probably a good starting point"
      Hope this helps!

  • @ummahafsahhimu4216
    @ummahafsahhimu4216 Před 3 lety

    Thank you so much. From where could I have the code?

    • @edurekaIN
      @edurekaIN  Před 3 lety

      Glad you liked it ! We are glad to have learners like you .Drop your mail id in the comment section for us to share the data sheets or source codes :) Do subscribe our channel and hit that bell icon to never miss an video from our channel

  • @gagan8643
    @gagan8643 Před 5 lety

    can we built gu interface in python for prediction

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hi Gagan! Yes, you can build a Graphic user interface with the help of Tkinter

    • @gagan8643
      @gagan8643 Před 5 lety

      @@edurekaIN okay. Thnku. But i am working on anaconda spyder. Can we built gui in spyder also for predicted system

  • @nixonsebastian2892
    @nixonsebastian2892 Před 4 lety

    how to draw the decision boundaries?

    • @edurekaIN
      @edurekaIN  Před 3 lety

      Refer to this link to resolve your query - stats.stackexchange.com/questions/370531/knn-decision-boundary

  • @amritajoshi8729
    @amritajoshi8729 Před 5 lety +2

    sir i request you to please provide us your mail id so that i could able to ask you some basic question regarding ML

    • @edurekaIN
      @edurekaIN  Před 5 lety +1

      Hey Amrita, please feel free to ask your queries over here and we will try our best to answer it for you. Cheers!

  • @lakshminavalli9600
    @lakshminavalli9600 Před 5 lety

    can we predict gender of human being based on height and weight using KNN classifier?

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hi Lakshmi! Yes, KNN is a classification algorithm and it can be used to predict the gender of a human based on available parameters. Hope this helps.

  • @sagarikarout5236
    @sagarikarout5236 Před 3 lety

    Can u plz provide me the data set

    • @edurekaIN
      @edurekaIN  Před 3 lety

      Hi Sagarika, kindly drop in your email id to help us assist you with the required source codes :)

  • @pavanaputqa
    @pavanaputqa Před 3 lety

    If I got same distance then what should we do???

    • @edurekaIN
      @edurekaIN  Před 3 lety

      Hi Sai, It really depends on how you want to implement it.
      Most algorithms will do one of three things:
      Include all equal distance points, so for this estimation, they'll use 6 points, not 5.
      Use the ""first"" found point of the two equidistant.
      Pick a random (usually with a consistent seed, so results are reproducible) point from the 2 points found.
      That being said, most algorithms based on radial searching have an inherent assumption of stationarity, in which case, it really shouldn't matter which of the options above you choose. In general, any of them should, theoretically, provide reasonable defaults (especially since they're the furthest points in the approximation, and should have the lowest effective weightings).

  • @mahii6205
    @mahii6205 Před 4 lety

    dear edurka team i need this python code plz help me to provide

    • @edurekaIN
      @edurekaIN  Před 4 lety

      Please share your email id with us (it will not be published). We will forward the source code to your email address.

  • @thenkprajapati
    @thenkprajapati Před 5 lety

    You said you will also implement KNN with Scikit Learn Library but you did not.

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hey Naresh, Thanks for the feedback. We will definitely look into your suggestion. Do subscribe, like and share to stay connected with us. Cheers!

  • @kalyani5831
    @kalyani5831 Před 5 lety

    What makes Knn algorithm slow? Value of K?

    • @edurekaIN
      @edurekaIN  Před 5 lety

      Hey Kalyani, "Since KNN algorithm considers the nearest neighbous, the algortithm becomes slow when you have many neighbours as the training set.
      'K’ in KNN is the number of nearest neighbours used to classify or (predict in case of continuous variable/regression) a test sample"
      Hope this helps!

  • @maYYidtS
    @maYYidtS Před 5 lety +1

    how to take k value