SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Nearest Neighbor Algorithm Zaffar Ahmed Shaikh
Topics Introduction – Memory-based algorithms K-nearest neighbor (KNN) algorithm How KNN works? KNN Example Different types of KNN
Introduction ,[object Object],[object Object]
How KNN works? Determine K (no of nearest neighbors) Calculate distance (Euclidean, Manhattan) Determine K-minimum distance neighbors Gather category Y values of nearest neighbors  Use simple majority of nearest neighbors to predict value of query instance
KNN Example Predict who will win today’s Cricket match between India and Pakistan based on users rating and previous results of matches played between the two teams.
1. Determine K Determine value of K  Suppose K = 3 2. Calculate distance Coordinates of query instance are (4,3,3) Coordinates of training instance(1) are (7,2,1) D = SQRT ((7-4)2+(2-3) 2+(1-3) 2) = 3.74165
2. Calculate distance
3. Determine K-minimum distance neighbors K = 3
4. Gather category Y values of nearest neighbors
5. Use simple majority of nearest neighbors to predict value of query instance Here India has won 2 matches 2 (-) signs and Pakistan has won 1 match 1 (+) sign We conclude that India will win today’s match
Different types of KNN  KNN for Classification KNN for Prediction KNN for Smoothing
Thank you
Nearest Neighbor Algorithm  Zaffar Ahmed

Weitere ähnliche Inhalte

Was ist angesagt?

Hierarchical clustering.pptx
Hierarchical clustering.pptxHierarchical clustering.pptx
Hierarchical clustering.pptxNTUConcepts1
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
3.2 partitioning methods
3.2 partitioning methods3.2 partitioning methods
3.2 partitioning methodsKrish_ver2
 
3.3 hierarchical methods
3.3 hierarchical methods3.3 hierarchical methods
3.3 hierarchical methodsKrish_ver2
 
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...Simplilearn
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clusteringishmecse13
 
K-Means clustring @jax
K-Means clustring @jaxK-Means clustring @jax
K-Means clustring @jaxAjay Iet
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsPrashanth Guntal
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data MiningValerii Klymchuk
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisJaclyn Kokx
 
Feed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentFeed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentMuhammad Rasel
 
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...Simplilearn
 

Was ist angesagt? (20)

Hierarchical clustering.pptx
Hierarchical clustering.pptxHierarchical clustering.pptx
Hierarchical clustering.pptx
 
Presentation on K-Means Clustering
Presentation on K-Means ClusteringPresentation on K-Means Clustering
Presentation on K-Means Clustering
 
Hierarchical Clustering
Hierarchical ClusteringHierarchical Clustering
Hierarchical Clustering
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
3.2 partitioning methods
3.2 partitioning methods3.2 partitioning methods
3.2 partitioning methods
 
3.3 hierarchical methods
3.3 hierarchical methods3.3 hierarchical methods
3.3 hierarchical methods
 
K means Clustering Algorithm
K means Clustering AlgorithmK means Clustering Algorithm
K means Clustering Algorithm
 
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
K Means Clustering Algorithm | K Means Clustering Example | Machine Learning ...
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
 
Clustering
ClusteringClustering
Clustering
 
K-Means clustring @jax
K-Means clustring @jaxK-Means clustring @jax
K-Means clustring @jax
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithms
 
KNN
KNN KNN
KNN
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data Mining
 
Decision tree
Decision treeDecision tree
Decision tree
 
Dbscan algorithom
Dbscan algorithomDbscan algorithom
Dbscan algorithom
 
Introduction to Linear Discriminant Analysis
Introduction to Linear Discriminant AnalysisIntroduction to Linear Discriminant Analysis
Introduction to Linear Discriminant Analysis
 
K - Nearest neighbor ( KNN )
K - Nearest neighbor  ( KNN )K - Nearest neighbor  ( KNN )
K - Nearest neighbor ( KNN )
 
Feed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descentFeed forward ,back propagation,gradient descent
Feed forward ,back propagation,gradient descent
 
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
 

Ähnlich wie Nearest Neighbor Algorithm Zaffar Ahmed

K- Nearest Neighbor Approach
K- Nearest Neighbor ApproachK- Nearest Neighbor Approach
K- Nearest Neighbor ApproachKumud Arora
 
instance bases k nearest neighbor algorithm.ppt
instance bases k nearest neighbor algorithm.pptinstance bases k nearest neighbor algorithm.ppt
instance bases k nearest neighbor algorithm.pptJohny139575
 
Machine learning in science and industry — day 1
Machine learning in science and industry — day 1Machine learning in science and industry — day 1
Machine learning in science and industry — day 1arogozhnikov
 
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...
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...IRJET Journal
 
Poggi analytics - distance - 1a
Poggi   analytics - distance - 1aPoggi   analytics - distance - 1a
Poggi analytics - distance - 1aGaston Liberman
 
Machine Learning: Classification Concepts (Part 1)
Machine Learning: Classification Concepts (Part 1)Machine Learning: Classification Concepts (Part 1)
Machine Learning: Classification Concepts (Part 1)Daniel Chan
 
K-Means Clustering Simply
K-Means Clustering SimplyK-Means Clustering Simply
K-Means Clustering SimplyEmad Nabil
 
MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackarogozhnikov
 
Ml9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsMl9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsankit_ppt
 
ENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-MeansENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-Meanstthonet
 
ANLY 501 Lab 7 Presentation Group 8 slide.pptx
ANLY 501 Lab 7 Presentation Group 8 slide.pptxANLY 501 Lab 7 Presentation Group 8 slide.pptx
ANLY 501 Lab 7 Presentation Group 8 slide.pptxrinehi3578
 
Vectorise all the things
Vectorise all the thingsVectorise all the things
Vectorise all the thingsJodieBurchell1
 
Classification of Iris Data using Kernel Radial Basis Probabilistic Neural N...
Classification of Iris Data using Kernel Radial Basis Probabilistic  Neural N...Classification of Iris Data using Kernel Radial Basis Probabilistic  Neural N...
Classification of Iris Data using Kernel Radial Basis Probabilistic Neural N...Scientific Review SR
 

Ähnlich wie Nearest Neighbor Algorithm Zaffar Ahmed (20)

knn-1.pptx
knn-1.pptxknn-1.pptx
knn-1.pptx
 
K- Nearest Neighbor Approach
K- Nearest Neighbor ApproachK- Nearest Neighbor Approach
K- Nearest Neighbor Approach
 
Knn 160904075605-converted
Knn 160904075605-convertedKnn 160904075605-converted
Knn 160904075605-converted
 
instance bases k nearest neighbor algorithm.ppt
instance bases k nearest neighbor algorithm.pptinstance bases k nearest neighbor algorithm.ppt
instance bases k nearest neighbor algorithm.ppt
 
KNN.pptx
KNN.pptxKNN.pptx
KNN.pptx
 
K-Nearest Neighbor(KNN)
K-Nearest Neighbor(KNN)K-Nearest Neighbor(KNN)
K-Nearest Neighbor(KNN)
 
Machine learning in science and industry — day 1
Machine learning in science and industry — day 1Machine learning in science and industry — day 1
Machine learning in science and industry — day 1
 
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...
Enhancing Classification Accuracy of K-Nearest Neighbors Algorithm using Gain...
 
Poggi analytics - distance - 1a
Poggi   analytics - distance - 1aPoggi   analytics - distance - 1a
Poggi analytics - distance - 1a
 
Machine Learning: Classification Concepts (Part 1)
Machine Learning: Classification Concepts (Part 1)Machine Learning: Classification Concepts (Part 1)
Machine Learning: Classification Concepts (Part 1)
 
Data analysis of weather forecasting
Data analysis of weather forecastingData analysis of weather forecasting
Data analysis of weather forecasting
 
TunUp final presentation
TunUp final presentationTunUp final presentation
TunUp final presentation
 
K-Means Clustering Simply
K-Means Clustering SimplyK-Means Clustering Simply
K-Means Clustering Simply
 
Knn demonstration
Knn demonstrationKnn demonstration
Knn demonstration
 
MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic track
 
Ml9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methodsMl9 introduction to-unsupervised_learning_and_clustering_methods
Ml9 introduction to-unsupervised_learning_and_clustering_methods
 
ENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-MeansENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-Means
 
ANLY 501 Lab 7 Presentation Group 8 slide.pptx
ANLY 501 Lab 7 Presentation Group 8 slide.pptxANLY 501 Lab 7 Presentation Group 8 slide.pptx
ANLY 501 Lab 7 Presentation Group 8 slide.pptx
 
Vectorise all the things
Vectorise all the thingsVectorise all the things
Vectorise all the things
 
Classification of Iris Data using Kernel Radial Basis Probabilistic Neural N...
Classification of Iris Data using Kernel Radial Basis Probabilistic  Neural N...Classification of Iris Data using Kernel Radial Basis Probabilistic  Neural N...
Classification of Iris Data using Kernel Radial Basis Probabilistic Neural N...
 

Mehr von Zaffar Ahmed Shaikh

SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...
SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...
SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...Zaffar Ahmed Shaikh
 
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...Zaffar Ahmed Shaikh
 
Higher Education in Pakistan: An ICT Integration Viewpoint
Higher Education in Pakistan: An ICT Integration ViewpointHigher Education in Pakistan: An ICT Integration Viewpoint
Higher Education in Pakistan: An ICT Integration ViewpointZaffar Ahmed Shaikh
 
Presentation: Higher Education in Pakistan: An ICT Integration Viewpoint
Presentation: Higher Education in Pakistan: An ICT Integration ViewpointPresentation: Higher Education in Pakistan: An ICT Integration Viewpoint
Presentation: Higher Education in Pakistan: An ICT Integration ViewpointZaffar Ahmed Shaikh
 
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...Zaffar Ahmed Shaikh
 
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...Zaffar Ahmed Shaikh
 
Role of ICT in Shaping the Future of Pakistani Higher Education System
Role of ICT in Shaping the Future of Pakistani Higher Education SystemRole of ICT in Shaping the Future of Pakistani Higher Education System
Role of ICT in Shaping the Future of Pakistani Higher Education SystemZaffar Ahmed Shaikh
 
Role of Teacher in Personal Learning Environments
Role of Teacher in Personal Learning EnvironmentsRole of Teacher in Personal Learning Environments
Role of Teacher in Personal Learning EnvironmentsZaffar Ahmed Shaikh
 
Presentation - Role of Teacher in Personal Learning Environments
Presentation - Role of Teacher in Personal Learning EnvironmentsPresentation - Role of Teacher in Personal Learning Environments
Presentation - Role of Teacher in Personal Learning EnvironmentsZaffar Ahmed Shaikh
 
Introduction to Social Computing - Book Chapter
Introduction to Social Computing - Book ChapterIntroduction to Social Computing - Book Chapter
Introduction to Social Computing - Book ChapterZaffar Ahmed Shaikh
 
Chapter 2 Cover Updated By Zaffar Ahmed Shaikh
Chapter 2 Cover Updated By Zaffar Ahmed ShaikhChapter 2 Cover Updated By Zaffar Ahmed Shaikh
Chapter 2 Cover Updated By Zaffar Ahmed ShaikhZaffar Ahmed Shaikh
 
Chapter 1 Cover Updated By Zaffar Ahmed Shaikh
Chapter 1 Cover Updated By Zaffar Ahmed ShaikhChapter 1 Cover Updated By Zaffar Ahmed Shaikh
Chapter 1 Cover Updated By Zaffar Ahmed ShaikhZaffar Ahmed Shaikh
 
Trust Based Recommendation Systems For Tourism System Zaffar Ahmed Shaikh
Trust Based Recommendation Systems For Tourism System   Zaffar Ahmed ShaikhTrust Based Recommendation Systems For Tourism System   Zaffar Ahmed Shaikh
Trust Based Recommendation Systems For Tourism System Zaffar Ahmed ShaikhZaffar Ahmed Shaikh
 
Social Computing Applications Infrastructure
Social Computing Applications InfrastructureSocial Computing Applications Infrastructure
Social Computing Applications InfrastructureZaffar Ahmed Shaikh
 
Zaffar+Ahmed+ +Collaborative+Filtering
Zaffar+Ahmed+ +Collaborative+FilteringZaffar+Ahmed+ +Collaborative+Filtering
Zaffar+Ahmed+ +Collaborative+FilteringZaffar Ahmed Shaikh
 

Mehr von Zaffar Ahmed Shaikh (17)

SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...
SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...
SkillsRec: A Novel Semantic Analysis Driven Learner Skills Mining and Filteri...
 
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...
Identifying Measures to Foster Teachers’ Competence for Personal Learning Env...
 
Higher Education in Pakistan: An ICT Integration Viewpoint
Higher Education in Pakistan: An ICT Integration ViewpointHigher Education in Pakistan: An ICT Integration Viewpoint
Higher Education in Pakistan: An ICT Integration Viewpoint
 
Presentation: Higher Education in Pakistan: An ICT Integration Viewpoint
Presentation: Higher Education in Pakistan: An ICT Integration ViewpointPresentation: Higher Education in Pakistan: An ICT Integration Viewpoint
Presentation: Higher Education in Pakistan: An ICT Integration Viewpoint
 
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...
Presentation: ZPD Incidence Development Strategy for Demand of ICTs in Higher...
 
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...
Usage, Acceptance, Adoption, and Diffusion of Information & Communication Tec...
 
Role of ICT in Shaping the Future of Pakistani Higher Education System
Role of ICT in Shaping the Future of Pakistani Higher Education SystemRole of ICT in Shaping the Future of Pakistani Higher Education System
Role of ICT in Shaping the Future of Pakistani Higher Education System
 
Role of Teacher in Personal Learning Environments
Role of Teacher in Personal Learning EnvironmentsRole of Teacher in Personal Learning Environments
Role of Teacher in Personal Learning Environments
 
Presentation - Role of Teacher in Personal Learning Environments
Presentation - Role of Teacher in Personal Learning EnvironmentsPresentation - Role of Teacher in Personal Learning Environments
Presentation - Role of Teacher in Personal Learning Environments
 
Network Theory
Network TheoryNetwork Theory
Network Theory
 
Introduction to Social Computing - Book Chapter
Introduction to Social Computing - Book ChapterIntroduction to Social Computing - Book Chapter
Introduction to Social Computing - Book Chapter
 
Chapter 2 Cover Updated By Zaffar Ahmed Shaikh
Chapter 2 Cover Updated By Zaffar Ahmed ShaikhChapter 2 Cover Updated By Zaffar Ahmed Shaikh
Chapter 2 Cover Updated By Zaffar Ahmed Shaikh
 
Chapter 1 Cover Updated By Zaffar Ahmed Shaikh
Chapter 1 Cover Updated By Zaffar Ahmed ShaikhChapter 1 Cover Updated By Zaffar Ahmed Shaikh
Chapter 1 Cover Updated By Zaffar Ahmed Shaikh
 
Prediction Markets
Prediction MarketsPrediction Markets
Prediction Markets
 
Trust Based Recommendation Systems For Tourism System Zaffar Ahmed Shaikh
Trust Based Recommendation Systems For Tourism System   Zaffar Ahmed ShaikhTrust Based Recommendation Systems For Tourism System   Zaffar Ahmed Shaikh
Trust Based Recommendation Systems For Tourism System Zaffar Ahmed Shaikh
 
Social Computing Applications Infrastructure
Social Computing Applications InfrastructureSocial Computing Applications Infrastructure
Social Computing Applications Infrastructure
 
Zaffar+Ahmed+ +Collaborative+Filtering
Zaffar+Ahmed+ +Collaborative+FilteringZaffar+Ahmed+ +Collaborative+Filtering
Zaffar+Ahmed+ +Collaborative+Filtering
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Nearest Neighbor Algorithm Zaffar Ahmed

  • 1. Nearest Neighbor Algorithm Zaffar Ahmed Shaikh
  • 2. Topics Introduction – Memory-based algorithms K-nearest neighbor (KNN) algorithm How KNN works? KNN Example Different types of KNN
  • 3.
  • 4. How KNN works? Determine K (no of nearest neighbors) Calculate distance (Euclidean, Manhattan) Determine K-minimum distance neighbors Gather category Y values of nearest neighbors Use simple majority of nearest neighbors to predict value of query instance
  • 5. KNN Example Predict who will win today’s Cricket match between India and Pakistan based on users rating and previous results of matches played between the two teams.
  • 6. 1. Determine K Determine value of K Suppose K = 3 2. Calculate distance Coordinates of query instance are (4,3,3) Coordinates of training instance(1) are (7,2,1) D = SQRT ((7-4)2+(2-3) 2+(1-3) 2) = 3.74165
  • 8. 3. Determine K-minimum distance neighbors K = 3
  • 9. 4. Gather category Y values of nearest neighbors
  • 10. 5. Use simple majority of nearest neighbors to predict value of query instance Here India has won 2 matches 2 (-) signs and Pakistan has won 1 match 1 (+) sign We conclude that India will win today’s match
  • 11. Different types of KNN KNN for Classification KNN for Prediction KNN for Smoothing