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.

KNN Algorithm Using R | Edureka

  • 2.
    DATA SCIENCE CERTIFICATIONwww.edureka.co/data-science Agenda 32 41 5 Machine Learning What is KNN Algorithm? KNN Use Case Hands - On KNN Algorithm
  • 3.
    DATA SCIENCE CERTIFICATIONwww.edureka.co/data-science Introduction To Machine Learning
  • 4.
    Machine learning isa 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 isa 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 CERTIFICATIONwww.edureka.co/data-science Types Of Machine Learning
  • 7.
    Supervised Machine Learning Supervised MachineLearning is a learning in which we teach or train the machine using data which is well labelled.
  • 8.
    Unsupervised learning isthe 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 Learningis 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 CERTIFICATIONwww.edureka.co/data-science What Is KNN Algorithm?
  • 11.
    DATA SCIENCE CERTIFICATIONwww.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 CERTIFICATIONwww.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 CERTIFICATIONwww.edureka.co/data-science KNN Use Case
  • 14.
    DATA SCIENCE CERTIFICATIONwww.edureka.co/data-science Book Recommendation Using KNN
  • 15.
    DATA SCIENCE CERTIFICATIONwww.edureka.co/data-science How KNN Algorithm Works?
  • 16.
    DATA SCIENCE CERTIFICATIONwww.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 CERTIFICATIONwww.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 CERTIFICATIONwww.edureka.co/data-science How Does KNN Algorithm Work? Here k=7, find the 7 nearest neighbours Class A Class B
  • 19.
    DATA SCIENCE CERTIFICATIONwww.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 CERTIFICATIONwww.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 CERTIFICATIONwww.edureka.co/data-science Demo YouTube Video Link in the Description
  • 22.
    DATA SCIENCE CERTIFICATIONwww.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 CERTIFICATIONwww.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.