SlideShare a Scribd company logo
KNN Algorithm Using R | Edureka
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Agenda
32 41 5
Machine
Learning
What is KNN
Algorithm?
KNN Use Case Hands - On
KNN Algorithm
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Introduction To Machine Learning
Machine learning is a subset of artificial intelligence (AI) which
provides machines the ability to learn automatically & improve from
experience without being explicitly programmed.
What Is Machine
Learning? Continuously
feed data
Machine learning is a subset of artificial intelligence (AI) which
provides machines the ability to learn automatically & improve from
experience without being explicitly programmed.
What Is Machine
Learning? Continuously
feed data
Predicted
output
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Types Of Machine Learning
Supervised
Machine Learning
Supervised Machine Learning is a learning in which we teach or train
the machine using data which is well labelled.
Unsupervised learning is the training of machine using information
that is unlabelled and allowing the algorithm to act on that
information without guidance
Unsupervised
Machine Learning
Reinforcement
Machine Learning
Reinforcement Learning is a part of Machine learning where an agent is put
in an environment and he learns to behave in this environment by
performing certain actions and observing the rewards which it gets from
those actions.
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
What Is KNN Algorithm?
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
What Is KNN Algorithm?
K Nearest Neighbour is a Supervised Learning algorithm that classifies a new data point into
the target class, depending on the features of it’s neighbouring data points.
KNN Algorithm
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Features Of KNN
Supervised learning
algorithm
Simple
Non-parametric
Lazy algorithm
Classification & regression algorithm
Based on feature similarity
No training step
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
KNN Use Case
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Book Recommendation Using KNN
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
How KNN Algorithm Works?
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
How Does KNN Algorithm Work?
Problem Statement: Assign the new data point into one of the two clusters
Class A
Class B
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
How Does KNN Algorithm Work?
Class A
Class B
Choose the value of ‘k’, here k=3 and find the 3 nearest neighbours
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
How Does KNN Algorithm Work?
Here k=7, find the 7 nearest neighbours
Class A
Class B
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
How Does KNN Algorithm Work?
Assign the new data point into Class B since majority of it’s nearest neighbours are of type class B
Class A
Class B
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Euclidian Distance
0
1
2
3
4
1 2 3 4 5
P1
P2
Point P1 = (1,4)
Point P2 = (5,1)
Euclidian distance =
Calculations
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Demo
YouTube Video Link in the Description
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
Demo
Problem Statement: Study a bank credit dataset and make a decision about whether to approve the loan of
an applicant based on his profile
KNN algorithm
Approve loan Reject loan
DATA SCIENCE CERTIFICATION www.edureka.co/data-science
WebDriver vs. IDE vs. RC
➢ Data Warehouse is like a relational database designed for analytical needs.
➢ It functions on the basis of OLAP (Online Analytical Processing).
➢ It is a central location where consolidated data from multiple locations (databases) are stored.

More Related Content

What's hot (20)

PDF
Deep Learning With Python Tutorial | Edureka
Edureka!
 
PPTX
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
Simplilearn
 
PPTX
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
PPTX
Recurrent neural network
Syed Annus Ali SHah
 
PPTX
Deep neural networks
Si Haem
 
PDF
Tensorflow presentation
Ahmed rebai
 
PPTX
Deep Learning With Neural Networks
Aniket Maurya
 
PDF
Machine Learning Course | Edureka
Edureka!
 
PDF
Transfer Learning
Hichem Felouat
 
PDF
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
PDF
Autoencoders
CloudxLab
 
PPTX
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Simplilearn
 
PPTX
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
PPTX
K-Nearest Neighbor(KNN)
Abdullah al Mamun
 
PDF
TensorFlow and Keras: An Overview
Poo Kuan Hoong
 
PPTX
Data Augmentation
Md Tajul Islam
 
PPTX
Linear regression with gradient descent
Suraj Parmar
 
PPTX
Deep Learning Explained
Melanie Swan
 
PPTX
K Nearest Neighbor Algorithm
Tharuka Vishwajith Sarathchandra
 
PPTX
Unsupervised learning (clustering)
Pravinkumar Landge
 
Deep Learning With Python Tutorial | Edureka
Edureka!
 
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
Simplilearn
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Simplilearn
 
Recurrent neural network
Syed Annus Ali SHah
 
Deep neural networks
Si Haem
 
Tensorflow presentation
Ahmed rebai
 
Deep Learning With Neural Networks
Aniket Maurya
 
Machine Learning Course | Edureka
Edureka!
 
Transfer Learning
Hichem Felouat
 
Convolutional Neural Networks (CNN)
Gaurav Mittal
 
Autoencoders
CloudxLab
 
Decision Tree Algorithm With Example | Decision Tree In Machine Learning | Da...
Simplilearn
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
K-Nearest Neighbor(KNN)
Abdullah al Mamun
 
TensorFlow and Keras: An Overview
Poo Kuan Hoong
 
Data Augmentation
Md Tajul Islam
 
Linear regression with gradient descent
Suraj Parmar
 
Deep Learning Explained
Melanie Swan
 
K Nearest Neighbor Algorithm
Tharuka Vishwajith Sarathchandra
 
Unsupervised learning (clustering)
Pravinkumar Landge
 

Similar to KNN Algorithm Using R | Edureka (20)

PDF
Introduction to data mining and machine learning
Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL
 
PDF
tghteh ddh4eth rtnrtrgthgh12500123196.pdf
NidhiKumari899659
 
PPTX
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx
agniva pradhan
 
PPTX
Statistical Machine Learning unit3 lecture notes
SureshK256753
 
PDF
Supervised Machine Learning PPT by K. Adisesha
Prof. Dr. K. Adisesha
 
PDF
Natural Language Processing of applications.pdf
pranavi452104
 
PPTX
KNN Classificationwithexplanation and examples.pptx
ansarinazish958
 
PPTX
KNN and steps to define knn and various properties.pptx
aamansagarrr
 
PPTX
MachineLearning.pptx
Bangtangurl
 
PPTX
K neareast neighbor algorithm presentation
Shiraz316
 
PPTX
KNN Classifier
Mobashshirur Rahman 👲
 
PPTX
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
DataMites
 
PPTX
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
PPTX
K-Nearest Neighbor Classifier
Neha Kulkarni
 
PPTX
Machine Learning.pptx
NitinSharma134320
 
PPTX
artificial intelligence.pptx
soundaryasellapandia
 
PDF
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
IRJET Journal
 
DOCX
Types of Machine Learnig Algorithms(CART, ID3)
Fatimakhan325
 
PDF
Machine Learning Algorithm - KNN
Kush Kulshrestha
 
PPT
KNN - Classification Model (Step by Step)
Manish nath choudhary
 
Introduction to data mining and machine learning
Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL
 
tghteh ddh4eth rtnrtrgthgh12500123196.pdf
NidhiKumari899659
 
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx
agniva pradhan
 
Statistical Machine Learning unit3 lecture notes
SureshK256753
 
Supervised Machine Learning PPT by K. Adisesha
Prof. Dr. K. Adisesha
 
Natural Language Processing of applications.pdf
pranavi452104
 
KNN Classificationwithexplanation and examples.pptx
ansarinazish958
 
KNN and steps to define knn and various properties.pptx
aamansagarrr
 
MachineLearning.pptx
Bangtangurl
 
K neareast neighbor algorithm presentation
Shiraz316
 
KNN Classifier
Mobashshirur Rahman 👲
 
K Nearest Neighbor V1.0 Supervised Machine Learning Algorithm
DataMites
 
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
K-Nearest Neighbor Classifier
Neha Kulkarni
 
Machine Learning.pptx
NitinSharma134320
 
artificial intelligence.pptx
soundaryasellapandia
 
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
IRJET Journal
 
Types of Machine Learnig Algorithms(CART, ID3)
Fatimakhan325
 
Machine Learning Algorithm - KNN
Kush Kulshrestha
 
KNN - Classification Model (Step by Step)
Manish nath choudhary
 
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
PDF
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
PDF
Tableau Tutorial for Data Science | Edureka
Edureka!
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PDF
Top 5 PMP Certifications | Edureka
Edureka!
 
PDF
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
PDF
Linux Mint Tutorial | Edureka
Edureka!
 
PDF
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
PDF
Importance of Digital Marketing | Edureka
Edureka!
 
PDF
RPA in 2020 | Edureka
Edureka!
 
PDF
Email Notifications in Jenkins | Edureka
Edureka!
 
PDF
EA Algorithm in Machine Learning | Edureka
Edureka!
 
PDF
Cognitive AI Tutorial | Edureka
Edureka!
 
PDF
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
PDF
Blue Prism Top Interview Questions | Edureka
Edureka!
 
PDF
Big Data on AWS Tutorial | Edureka
Edureka!
 
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
PDF
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
PDF
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
July Patch Tuesday
Ivanti
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Français Patch Tuesday - Juillet
Ivanti
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 

KNN Algorithm Using R | Edureka

  • 2. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Agenda 32 41 5 Machine Learning What is KNN Algorithm? KNN Use Case Hands - On KNN Algorithm
  • 3. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Introduction To Machine Learning
  • 4. Machine learning is a subset of artificial intelligence (AI) which provides machines the ability to learn automatically & improve from experience without being explicitly programmed. What Is Machine Learning? Continuously feed data
  • 5. Machine learning is a subset of artificial intelligence (AI) which provides machines the ability to learn automatically & improve from experience without being explicitly programmed. What Is Machine Learning? Continuously feed data Predicted output
  • 6. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Types Of Machine Learning
  • 7. Supervised Machine Learning Supervised Machine Learning is a learning in which we teach or train the machine using data which is well labelled.
  • 8. Unsupervised learning is the training of machine using information that is unlabelled and allowing the algorithm to act on that information without guidance Unsupervised Machine Learning
  • 9. Reinforcement Machine Learning Reinforcement Learning is a part of Machine learning where an agent is put in an environment and he learns to behave in this environment by performing certain actions and observing the rewards which it gets from those actions.
  • 10. DATA SCIENCE CERTIFICATION www.edureka.co/data-science What Is KNN Algorithm?
  • 11. DATA SCIENCE CERTIFICATION www.edureka.co/data-science What Is KNN Algorithm? K Nearest Neighbour is a Supervised Learning algorithm that classifies a new data point into the target class, depending on the features of it’s neighbouring data points. KNN Algorithm
  • 12. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Features Of KNN Supervised learning algorithm Simple Non-parametric Lazy algorithm Classification & regression algorithm Based on feature similarity No training step
  • 13. DATA SCIENCE CERTIFICATION www.edureka.co/data-science KNN Use Case
  • 14. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Book Recommendation Using KNN
  • 15. DATA SCIENCE CERTIFICATION www.edureka.co/data-science How KNN Algorithm Works?
  • 16. DATA SCIENCE CERTIFICATION www.edureka.co/data-science How Does KNN Algorithm Work? Problem Statement: Assign the new data point into one of the two clusters Class A Class B
  • 17. DATA SCIENCE CERTIFICATION www.edureka.co/data-science How Does KNN Algorithm Work? Class A Class B Choose the value of ‘k’, here k=3 and find the 3 nearest neighbours
  • 18. DATA SCIENCE CERTIFICATION www.edureka.co/data-science How Does KNN Algorithm Work? Here k=7, find the 7 nearest neighbours Class A Class B
  • 19. DATA SCIENCE CERTIFICATION www.edureka.co/data-science How Does KNN Algorithm Work? Assign the new data point into Class B since majority of it’s nearest neighbours are of type class B Class A Class B
  • 20. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Euclidian Distance 0 1 2 3 4 1 2 3 4 5 P1 P2 Point P1 = (1,4) Point P2 = (5,1) Euclidian distance = Calculations
  • 21. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Demo YouTube Video Link in the Description
  • 22. DATA SCIENCE CERTIFICATION www.edureka.co/data-science Demo Problem Statement: Study a bank credit dataset and make a decision about whether to approve the loan of an applicant based on his profile KNN algorithm Approve loan Reject loan
  • 23. DATA SCIENCE CERTIFICATION www.edureka.co/data-science WebDriver vs. IDE vs. RC ➢ Data Warehouse is like a relational database designed for analytical needs. ➢ It functions on the basis of OLAP (Online Analytical Processing). ➢ It is a central location where consolidated data from multiple locations (databases) are stored.