artificial intelligence.pptx

NADAR SARASWATHI
COLLEGE OF ARTS AND
SCIENCE , THENI.
K-NEAREST NEIGHBOR ALGORITHM
SUBMITED BY:
B.POORANI
II-MSC(CS)
K-NEAREST NEIGHBOR ALGORITHM
 K-Nearest Neighbour is one of the simplest Machine Learning
algorithms based on Supervised Learning technique.
 K-NN algorithm assumes the similarity between the new case/data
and available cases and put the new case into the category that is
most similar to the available categories.
 K-NN algorithm stores all the available data and classifies a new data
point based on the similarity. This means when new data appears then
it can be easily classified into a well suite category by using K- NN
algorithm.
 K-NN algorithm can be used for Regression as well as for
Classification but mostly it is used for the Classification problems.
artificial intelligence.pptx
artificial intelligence.pptx
KNN ALGORITHM WORKS:
 Step-1: Select the number K of the neighbors
 Step-2: Calculate the Euclidean distance of K number of neighbors
 Step-3: Take the K nearest neighbors as per the calculated Euclidean
distance.
 Step-4: Among these k neighbors, count the number of the data
points in each category.
 Step-5: Assign the new data points to that category for which the
number of the neighbor is maximum.
 Step-6: Our model is ready.
Distance Metrics Used in KNN Algorithm
 The KNN algorithm helps us identify the nearest points or the groups
for a query point.
 Euclidean Distance
 Manhattan Distance
 Minkowski Distance
Euclidean Distance
 This is nothing but the cartesian distance between the two points
which are in the plane/hyperplane. Euclidean distance can also be
visualized as the length of the straight line that joins the two points
which are into consideration.
Applications of the KNN Algorithm
 Data Preprocessing – While dealing with any Machine Learning
problem we first perform the EDA part in which if we find that the
data contains missing values then there are multiple imputation
methods are available as well. One of such method is KNN
Imputer which is quite effective ad generally used for sophisticated
imputation methodologies.
 Pattern Recognition – KNN algorithms work very well if you have
trained a KNN algorithm using the MNIST dataset and then
performed the evaluation process then you must have come across the
fact that the accuracy is too high.
 Recommendation Engines – The main task which is performed by a
KNN algorithm is to assign a new query point to a pre-existed group
that has been created using a huge corpus of datasets. This is exactly
what is required in the recommender systems to assign each user to a
particular group and then provide them recommendations based on
that group’s preferences.
THANK YOU
1 of 8

Recommended

MachineLearning.pptx by
MachineLearning.pptxMachineLearning.pptx
MachineLearning.pptxBangtangurl
1 view23 slides
KNN - Classification Model (Step by Step) by
KNN - Classification Model (Step by Step)KNN - Classification Model (Step by Step)
KNN - Classification Model (Step by Step)Manish nath choudhary
909 views10 slides
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain... by
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...IRJET Journal
41 views4 slides
Types of Machine Learnig Algorithms(CART, ID3) by
Types of Machine Learnig Algorithms(CART, ID3)Types of Machine Learnig Algorithms(CART, ID3)
Types of Machine Learnig Algorithms(CART, ID3)Fatimakhan325
68 views11 slides
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx by
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptxNEAREST NEIGHBOUR CLUSTER ANALYSIS.pptx
NEAREST NEIGHBOUR CLUSTER ANALYSIS.pptxagniva pradhan
36 views13 slides
Survey on classification algorithms for data mining (comparison and evaluation) by
Survey on classification algorithms for data mining (comparison and evaluation)Survey on classification algorithms for data mining (comparison and evaluation)
Survey on classification algorithms for data mining (comparison and evaluation)Alexander Decker
1.1K views8 slides

More Related Content

Similar to artificial intelligence.pptx

Recognition of Handwritten Mathematical Equations by
Recognition of  Handwritten Mathematical EquationsRecognition of  Handwritten Mathematical Equations
Recognition of Handwritten Mathematical EquationsIRJET Journal
61 views3 slides
KNN.pptx by
KNN.pptxKNN.pptx
KNN.pptxMohamed Essam
78 views15 slides
Clustering Algorithms for Data Stream by
Clustering Algorithms for Data StreamClustering Algorithms for Data Stream
Clustering Algorithms for Data StreamIRJET Journal
37 views6 slides
Parallel knn on gpu architecture using opencl by
Parallel knn on gpu architecture using openclParallel knn on gpu architecture using opencl
Parallel knn on gpu architecture using opencleSAT Journals
69 views6 slides
Parallel k nn on gpu architecture using opencl by
Parallel k nn on gpu architecture using openclParallel k nn on gpu architecture using opencl
Parallel k nn on gpu architecture using opencleSAT Publishing House
326 views6 slides
CSA 3702 machine learning module 3 by
CSA 3702 machine learning module 3CSA 3702 machine learning module 3
CSA 3702 machine learning module 3Nandhini S
111 views96 slides

Similar to artificial intelligence.pptx(20)

Recognition of Handwritten Mathematical Equations by IRJET Journal
Recognition of  Handwritten Mathematical EquationsRecognition of  Handwritten Mathematical Equations
Recognition of Handwritten Mathematical Equations
IRJET Journal61 views
Clustering Algorithms for Data Stream by IRJET Journal
Clustering Algorithms for Data StreamClustering Algorithms for Data Stream
Clustering Algorithms for Data Stream
IRJET Journal37 views
Parallel knn on gpu architecture using opencl by eSAT Journals
Parallel knn on gpu architecture using openclParallel knn on gpu architecture using opencl
Parallel knn on gpu architecture using opencl
eSAT Journals69 views
CSA 3702 machine learning module 3 by Nandhini S
CSA 3702 machine learning module 3CSA 3702 machine learning module 3
CSA 3702 machine learning module 3
Nandhini S111 views
New Approach for K-mean and K-medoids Algorithm by Editor IJCATR
New Approach for K-mean and K-medoids AlgorithmNew Approach for K-mean and K-medoids Algorithm
New Approach for K-mean and K-medoids Algorithm
Editor IJCATR2.7K views
Improving K-NN Internet Traffic Classification Using Clustering and Principle... by journalBEEI
Improving K-NN Internet Traffic Classification Using Clustering and Principle...Improving K-NN Internet Traffic Classification Using Clustering and Principle...
Improving K-NN Internet Traffic Classification Using Clustering and Principle...
journalBEEI6 views
Eckovation machine learning project by Vinod Jatav
Eckovation machine learning projectEckovation machine learning project
Eckovation machine learning project
Vinod Jatav172 views
DagdelenSiriwardaneY.. by butest
DagdelenSiriwardaneY..DagdelenSiriwardaneY..
DagdelenSiriwardaneY..
butest560 views
Supervised and unsupervised learning by AmAn Singh
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
AmAn Singh321 views
An Efficient Approach for Multi-Target Tracking in Sensor Networks using Ant ... by ijsrd.com
An Efficient Approach for Multi-Target Tracking in Sensor Networks using Ant ...An Efficient Approach for Multi-Target Tracking in Sensor Networks using Ant ...
An Efficient Approach for Multi-Target Tracking in Sensor Networks using Ant ...
ijsrd.com374 views
Experimental study of Data clustering using k- Means and modified algorithms by IJDKP
Experimental study of Data clustering using k- Means and modified algorithmsExperimental study of Data clustering using k- Means and modified algorithms
Experimental study of Data clustering using k- Means and modified algorithms
IJDKP3.5K views
International Journal of Engineering and Science Invention (IJESI) by inventionjournals
International Journal of Engineering and Science Invention (IJESI)International Journal of Engineering and Science Invention (IJESI)
International Journal of Engineering and Science Invention (IJESI)
inventionjournals153 views

More from soundaryasellapandia

apache hadOop.pdf by
apache hadOop.pdfapache hadOop.pdf
apache hadOop.pdfsoundaryasellapandia
8 views10 slides
Microfinance and entrepreneur skill and competition by
Microfinance and entrepreneur skill and competitionMicrofinance and entrepreneur skill and competition
Microfinance and entrepreneur skill and competitionsoundaryasellapandia
12 views11 slides
Color quantization by
Color quantizationColor quantization
Color quantizationsoundaryasellapandia
13 views10 slides
cloud security challenges and risk.pptx by
cloud security challenges and risk.pptxcloud security challenges and risk.pptx
cloud security challenges and risk.pptxsoundaryasellapandia
9 views9 slides
cloud computing.pdf by
cloud computing.pdfcloud computing.pdf
cloud computing.pdfsoundaryasellapandia
6 views9 slides
ARTIFICIAL INTELIGENCE.pdf by
ARTIFICIAL INTELIGENCE.pdfARTIFICIAL INTELIGENCE.pdf
ARTIFICIAL INTELIGENCE.pdfsoundaryasellapandia
10 views9 slides

Recently uploaded

Design Driven Network Assurance by
Design Driven Network AssuranceDesign Driven Network Assurance
Design Driven Network AssuranceNetwork Automation Forum
19 views42 slides
Five Things You SHOULD Know About Postman by
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About PostmanPostman
38 views43 slides
Piloting & Scaling Successfully With Microsoft Viva by
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft VivaRichard Harbridge
13 views160 slides
Scaling Knowledge Graph Architectures with AI by
Scaling Knowledge Graph Architectures with AIScaling Knowledge Graph Architectures with AI
Scaling Knowledge Graph Architectures with AIEnterprise Knowledge
50 views15 slides
Evolving the Network Automation Journey from Python to Platforms by
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
17 views21 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
139 views17 slides

Recently uploaded(20)

Five Things You SHOULD Know About Postman by Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman38 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker48 views
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院 by IttrainingIttraining
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
【USB韌體設計課程】精選講義節錄-USB的列舉過程_艾鍗學院
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana17 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays24 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto13 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays33 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views

artificial intelligence.pptx

  • 1. NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE , THENI. K-NEAREST NEIGHBOR ALGORITHM SUBMITED BY: B.POORANI II-MSC(CS)
  • 2. K-NEAREST NEIGHBOR ALGORITHM  K-Nearest Neighbour is one of the simplest Machine Learning algorithms based on Supervised Learning technique.  K-NN algorithm assumes the similarity between the new case/data and available cases and put the new case into the category that is most similar to the available categories.  K-NN algorithm stores all the available data and classifies a new data point based on the similarity. This means when new data appears then it can be easily classified into a well suite category by using K- NN algorithm.  K-NN algorithm can be used for Regression as well as for Classification but mostly it is used for the Classification problems.
  • 5. KNN ALGORITHM WORKS:  Step-1: Select the number K of the neighbors  Step-2: Calculate the Euclidean distance of K number of neighbors  Step-3: Take the K nearest neighbors as per the calculated Euclidean distance.  Step-4: Among these k neighbors, count the number of the data points in each category.  Step-5: Assign the new data points to that category for which the number of the neighbor is maximum.  Step-6: Our model is ready.
  • 6. Distance Metrics Used in KNN Algorithm  The KNN algorithm helps us identify the nearest points or the groups for a query point.  Euclidean Distance  Manhattan Distance  Minkowski Distance Euclidean Distance  This is nothing but the cartesian distance between the two points which are in the plane/hyperplane. Euclidean distance can also be visualized as the length of the straight line that joins the two points which are into consideration.
  • 7. Applications of the KNN Algorithm  Data Preprocessing – While dealing with any Machine Learning problem we first perform the EDA part in which if we find that the data contains missing values then there are multiple imputation methods are available as well. One of such method is KNN Imputer which is quite effective ad generally used for sophisticated imputation methodologies.  Pattern Recognition – KNN algorithms work very well if you have trained a KNN algorithm using the MNIST dataset and then performed the evaluation process then you must have come across the fact that the accuracy is too high.  Recommendation Engines – The main task which is performed by a KNN algorithm is to assign a new query point to a pre-existed group that has been created using a huge corpus of datasets. This is exactly what is required in the recommender systems to assign each user to a particular group and then provide them recommendations based on that group’s preferences.