SlideShare uma empresa Scribd logo
1 de 10
Instance-Based
   Learning
• Instance-Based Learning (Lazy
  Learning)
   – Learning = storing all “training”
     instances
   – Classification = an instance gets
     a classification equal to the
     classification of the nearest
     instances to the instance
Instance-Based Learning



       Its very similar to a
            Desktop!!
Instance/Memory-based Learning
  • Non-parameteric
    – Hypothesis(Assumption)      complexity
      grows with the data
  • Memory-based learning
    – Construct hypotheses directly from the
      training data itself




                                           4
K Nearest Neighbors
• The key issues involved in training this
  model includes setting
  – the variable K
      • Validation techniques
       (ex. Cross validation)
  – the type of distant metric
      • Euclidean measure

                     D                2

    Dist ( X , Y )         ( Xi Yi)
                     i 1
                                             5
Figure K Nearest Neighbors Example




                                    X




       Stored training set patterns
X      input pattern for classification
---     Euclidean distance measure to the nearest three patterns
                                                                   6
Store all input data in the training set



          For each pattern in the test set



 Search for the K nearest patterns to the input
 pattern using a Euclidean distance measure




For classification, compute the confidence for
each class as Ci /K,
(where Ci is the number of patterns among the K
nearest patterns belonging to class i.)
The classification for the input pattern is the class
with the highest confidence.


                                                        7
Training parameters and typical settings

• Number of nearest neighbors
   – The numbers of nearest neighbors (K) should be
     based on cross validation over a number of K
     setting.
   – When k=1 is a good baseline model to benchmark
     against.
   – A good rule-of-thumb numbers is k should be less
     than the square root of the total number of
     training patterns.



                                                    8
Training parameters and typical settings
  • Input compression
     – Since KNN is very storage intensive, we may want
       to compress data patterns as a preprocessing step
       before classification.

     – Using input compression will result in slightly
       worse performance.

     – Sometimes using compression will improve
       performance because it performs automatic
       normalization of the data which can equalize the
       effect of each input in the Euclidean distance
       measure.



                                                      9
Issues
• Distance measure
   – Most common: Euclidean
   – Better distance measures: normalize each variable by standard
      deviation
   – For discrete data, can use hamming distance

• Choosing k
   – Increasing k reduces variance, increases bias

• For “high-dimensional space”, problem that the nearest neighbor
  may not be very close at all!

• Memory-based technique. Must make a pass through the data
  for each classification. This can be prohibitive for large data sets.
• Indexing the data can help; for example KD trees

                                                                      10

Mais conteúdo relacionado

Mais procurados

Statistical Pattern recognition(1)
Statistical Pattern recognition(1)Statistical Pattern recognition(1)
Statistical Pattern recognition(1)
Syed Atif Naseem
 

Mais procurados (20)

Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM )
 
05 Clustering in Data Mining
05 Clustering in Data Mining05 Clustering in Data Mining
05 Clustering in Data Mining
 
Unsupervised learning
Unsupervised learningUnsupervised learning
Unsupervised learning
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade off
 
Presentation on unsupervised learning
Presentation on unsupervised learning Presentation on unsupervised learning
Presentation on unsupervised learning
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
 
Steepest descent method
Steepest descent methodSteepest descent method
Steepest descent method
 
Presentation on K-Means Clustering
Presentation on K-Means ClusteringPresentation on K-Means Clustering
Presentation on K-Means Clustering
 
Gradient Boosted trees
Gradient Boosted treesGradient Boosted trees
Gradient Boosted trees
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Overfitting & Underfitting
Overfitting & UnderfittingOverfitting & Underfitting
Overfitting & Underfitting
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
 
Statistical Pattern recognition(1)
Statistical Pattern recognition(1)Statistical Pattern recognition(1)
Statistical Pattern recognition(1)
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
 
Stochastic Gradient Decent (SGD).pptx
Stochastic Gradient Decent (SGD).pptxStochastic Gradient Decent (SGD).pptx
Stochastic Gradient Decent (SGD).pptx
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 

Semelhante a Instance based learning

Instance based learning
Instance based learningInstance based learning
Instance based learning
Slideshare
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
butest
 

Semelhante a Instance based learning (20)

Instance based learning
Instance based learningInstance based learning
Instance based learning
 
KNN
KNNKNN
KNN
 
09_dm1_knn_2022_23.pdf
09_dm1_knn_2022_23.pdf09_dm1_knn_2022_23.pdf
09_dm1_knn_2022_23.pdf
 
K-Nearest Neighbor Classifier
K-Nearest Neighbor ClassifierK-Nearest Neighbor Classifier
K-Nearest Neighbor Classifier
 
KNN.pptx
KNN.pptxKNN.pptx
KNN.pptx
 
KNN.pptx
KNN.pptxKNN.pptx
KNN.pptx
 
Unsupervised learning clustering
Unsupervised learning clusteringUnsupervised learning clustering
Unsupervised learning clustering
 
Machine Learning workshop by GDSC Amity University Chhattisgarh
Machine Learning workshop by GDSC Amity University ChhattisgarhMachine Learning workshop by GDSC Amity University Chhattisgarh
Machine Learning workshop by GDSC Amity University Chhattisgarh
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Knn 160904075605-converted
Knn 160904075605-convertedKnn 160904075605-converted
Knn 160904075605-converted
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?How Machine Learning Helps Organizations to Work More Efficiently?
How Machine Learning Helps Organizations to Work More Efficiently?
 
Clustering on database systems rkm
Clustering on database systems rkmClustering on database systems rkm
Clustering on database systems rkm
 
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
 
KNN presentation.pdf
KNN presentation.pdfKNN presentation.pdf
KNN presentation.pdf
 
Training machine learning knn 2017
Training machine learning knn 2017Training machine learning knn 2017
Training machine learning knn 2017
 
Lecture 8: Decision Trees & k-Nearest Neighbors
Lecture 8: Decision Trees & k-Nearest NeighborsLecture 8: Decision Trees & k-Nearest Neighbors
Lecture 8: Decision Trees & k-Nearest Neighbors
 
k-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptxk-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptx
 
UNIT_V_Cluster Analysis.pptx
UNIT_V_Cluster Analysis.pptxUNIT_V_Cluster Analysis.pptx
UNIT_V_Cluster Analysis.pptx
 
Lecture3 (3).ppt
Lecture3 (3).pptLecture3 (3).ppt
Lecture3 (3).ppt
 

Mais de Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
Slideshare
 
Report generation
Report generationReport generation
Report generation
Slideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
Slideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
Slideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
Slideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Slideshare
 
What is in you
What is in youWhat is in you
What is in you
Slideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
Slideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
Slideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
Slideshare
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
Slideshare
 

Mais de Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Logic agent
Logic agentLogic agent
Logic agent
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Instance based learning

  • 1. Instance-Based Learning
  • 2. • Instance-Based Learning (Lazy Learning) – Learning = storing all “training” instances – Classification = an instance gets a classification equal to the classification of the nearest instances to the instance
  • 3. Instance-Based Learning Its very similar to a Desktop!!
  • 4. Instance/Memory-based Learning • Non-parameteric – Hypothesis(Assumption) complexity grows with the data • Memory-based learning – Construct hypotheses directly from the training data itself 4
  • 5. K Nearest Neighbors • The key issues involved in training this model includes setting – the variable K • Validation techniques (ex. Cross validation) – the type of distant metric • Euclidean measure D 2 Dist ( X , Y ) ( Xi Yi) i 1 5
  • 6. Figure K Nearest Neighbors Example X Stored training set patterns X input pattern for classification --- Euclidean distance measure to the nearest three patterns 6
  • 7. Store all input data in the training set For each pattern in the test set Search for the K nearest patterns to the input pattern using a Euclidean distance measure For classification, compute the confidence for each class as Ci /K, (where Ci is the number of patterns among the K nearest patterns belonging to class i.) The classification for the input pattern is the class with the highest confidence. 7
  • 8. Training parameters and typical settings • Number of nearest neighbors – The numbers of nearest neighbors (K) should be based on cross validation over a number of K setting. – When k=1 is a good baseline model to benchmark against. – A good rule-of-thumb numbers is k should be less than the square root of the total number of training patterns. 8
  • 9. Training parameters and typical settings • Input compression – Since KNN is very storage intensive, we may want to compress data patterns as a preprocessing step before classification. – Using input compression will result in slightly worse performance. – Sometimes using compression will improve performance because it performs automatic normalization of the data which can equalize the effect of each input in the Euclidean distance measure. 9
  • 10. Issues • Distance measure – Most common: Euclidean – Better distance measures: normalize each variable by standard deviation – For discrete data, can use hamming distance • Choosing k – Increasing k reduces variance, increases bias • For “high-dimensional space”, problem that the nearest neighbor may not be very close at all! • Memory-based technique. Must make a pass through the data for each classification. This can be prohibitive for large data sets. • Indexing the data can help; for example KD trees 10