SlideShare a Scribd company logo
DEPARTMENT OF COMPUTER SCIENCE
R.RAMYA DEVI
II-MSC(CS)
ARTIFICIAL INTELLIGENCE
AND MACHINE LEARNING
K-Nearest Neighbors (KNN)
Simple, but a very powerful classification
algorithm Classifies based on a similarity
measure Non-parametric Lazy learning
Does not “learn” until the test example is
given Whenever we have a new data to
classify, we find its K-nearest neighbors from
the training data
Classified by “MAJORITY VOTES”
for its neighbor classes Assigned to the
most common class amongst its Knearest
neighbors (by measuring “distant” between
data)
Voronoi diagram
Describes the areas that are nearest to any
given point, given a set of data. Each line
segment is equidistant between two points of
opposite class
Learning and implementation is extremely
simple and Intuitive Flexible decision
boundaries
Numerical measure of how alike two data
objects are. Is higher when objects are more
alike. Often falls in the range [0,1]
Irrelevant or correlated features have high
impact and must be eliminated Typically
difficult to handle high dimensionality
Computational costs: memory and
classification time computation
Numerical measure of how different are two
data objects Lower when objects are more
alike Minimum dissimilarity is often 0
Upper limit varies
Euclidean Distance 𝑑𝑖𝑠𝑡 = σ𝑘=1 𝑝 (𝑎𝑘 − 𝑏𝑘 ) 2
Where p is the number of dimensions
(attributes) and 𝑎𝑘 and 𝑏𝑘 are, respectively,
the k-th attributes (components) or data
objects a and b. Standardization is
necessary, if scales differ
THANK YOU

More Related Content

PPTX
K Nearest Neighbor Algorithm
PPT
instance bases k nearest neighbor algorithm.ppt
PPTX
Knn 160904075605-converted
PDF
Lecture 6 - Classification Classification
PPTX
knn is the k nearest algorithm ppt that includes all about knn, its adv and d...
PPTX
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx
K Nearest Neighbor Algorithm
instance bases k nearest neighbor algorithm.ppt
Knn 160904075605-converted
Lecture 6 - Classification Classification
knn is the k nearest algorithm ppt that includes all about knn, its adv and d...
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx

Similar to R Ramya devi artificial intelligence and machine learning (20)

PPTX
K Nearest Neighbour (KNN) Alg.pptx fro machine learning
PPTX
SkNoushadddoja_28100119039.pptx
PDF
K nearest neighbours
PPTX
K-Nearest Neighbor Classifier
PDF
tghteh ddh4eth rtnrtrgthgh12500123196.pdf
PDF
Lecture03 - K-Nearest-Neighbor Machine learning
PPTX
k-nearest neighbour Machine Learning.pptx
PPTX
Machine learning session 6
PDF
K Nearest neighbour
PPTX
W5_CLASSIFICATION.pptxW5_CLASSIFICATION.pptx
PDF
Di35605610
PPTX
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
PPTX
k-Nearest Neighbors with brief explanation.pptx
PDF
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
PDF
Introduction to classification K-Nearest Neighbour
PPTX
K-Nearest Neighbor(KNN)
PDF
PDF
Natural Language Processing of applications.pdf
K Nearest Neighbour (KNN) Alg.pptx fro machine learning
SkNoushadddoja_28100119039.pptx
K nearest neighbours
K-Nearest Neighbor Classifier
tghteh ddh4eth rtnrtrgthgh12500123196.pdf
Lecture03 - K-Nearest-Neighbor Machine learning
k-nearest neighbour Machine Learning.pptx
Machine learning session 6
K Nearest neighbour
W5_CLASSIFICATION.pptxW5_CLASSIFICATION.pptx
Di35605610
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
k-Nearest Neighbors with brief explanation.pptx
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
Introduction to classification K-Nearest Neighbour
K-Nearest Neighbor(KNN)
Natural Language Processing of applications.pdf
Ad

More from PriyadharshiniVS (20)

PPTX
R Ramya devi digital image processing
PPTX
R ramya devi cloud computing
PPTX
Ramya devi R women empowerment
PPTX
Ramya devi R internet of things
PPTX
PPTX
PPTX
PPTX
PPTX
MOBILE APP DEVELOPMENT USING PYTHON
PPTX
Vanmathy python
PPTX
PriyaDharshini distributed operating system
PPTX
Vanmathy distributed operating system
PPTX
vanmathy cryptography network security
PPTX
vanmathy cryptography network security
PPTX
Vanmathy distributed operating system
PPTX
Vanmathy no sql
PPTX
Cryptography and network security
PPTX
PPTX
Graph, graph and network modeling, advantage of graph database
PPTX
Compiler design
R Ramya devi digital image processing
R ramya devi cloud computing
Ramya devi R women empowerment
Ramya devi R internet of things
MOBILE APP DEVELOPMENT USING PYTHON
Vanmathy python
PriyaDharshini distributed operating system
Vanmathy distributed operating system
vanmathy cryptography network security
vanmathy cryptography network security
Vanmathy distributed operating system
Vanmathy no sql
Cryptography and network security
Graph, graph and network modeling, advantage of graph database
Compiler design
Ad

Recently uploaded (20)

PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Structure & Organelles in detailed.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Anesthesia in Laparoscopic Surgery in India
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Final Presentation General Medicine 03-08-2024.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Classroom Observation Tools for Teachers
Cell Structure & Organelles in detailed.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

R Ramya devi artificial intelligence and machine learning

  • 1. DEPARTMENT OF COMPUTER SCIENCE R.RAMYA DEVI II-MSC(CS)
  • 3. K-Nearest Neighbors (KNN) Simple, but a very powerful classification algorithm Classifies based on a similarity measure Non-parametric Lazy learning Does not “learn” until the test example is given Whenever we have a new data to classify, we find its K-nearest neighbors from the training data
  • 4. Classified by “MAJORITY VOTES” for its neighbor classes Assigned to the most common class amongst its Knearest neighbors (by measuring “distant” between data)
  • 5. Voronoi diagram Describes the areas that are nearest to any given point, given a set of data. Each line segment is equidistant between two points of opposite class
  • 6. Learning and implementation is extremely simple and Intuitive Flexible decision boundaries
  • 7. Numerical measure of how alike two data objects are. Is higher when objects are more alike. Often falls in the range [0,1]
  • 8. Irrelevant or correlated features have high impact and must be eliminated Typically difficult to handle high dimensionality Computational costs: memory and classification time computation
  • 9. Numerical measure of how different are two data objects Lower when objects are more alike Minimum dissimilarity is often 0 Upper limit varies
  • 10. Euclidean Distance 𝑑𝑖𝑠𝑡 = σ𝑘=1 𝑝 (𝑎𝑘 − 𝑏𝑘 ) 2 Where p is the number of dimensions (attributes) and 𝑎𝑘 and 𝑏𝑘 are, respectively, the k-th attributes (components) or data objects a and b. Standardization is necessary, if scales differ