SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Statistical Learning
Statistical Approaches
•   Statistical Learning
•   Naïve Bayes
•   Instance-based Learning
•   Neural Networks
Example: Candy Bags
• Candy comes in two flavors: cherry () and lime ()
• Candy is wrapped, can’t tell which flavor until opened
• There are 5 kinds of bags of candy:
   –   H1= all cherry (P(c|h1) = 1, P(l|h1) = 0)
   –   H2= 75% cherry, 25% lime
   –   H3= 50% cherry, 50% lime
   –   H4= 25% cherry, 75% lime
   –   H5= 100% lime
• Given a new bag of candy, predict H
• Observations: D1, D2 , D3, …
Bayesian Learning
• Calculate the probability of each hypothesis, given the data,
  and make prediction weighted by this probability (i.e. use all
  the hypothesis, not just the single best)
                        P ( d|hi )P (hi )
           P(hi | d)          P ( d)
                                            P(d | hi )P(hi )
• Now, if we want to predict some unknown quantity X



               P( X | d)             P( X |hi )P(hi | d)
                                 i
Bayesian Learning cont.
• Calculating P(h|d)


               P(hi | d)    P(d | hi )P(hi )
                            likelihood prior
• Assume the observations are i.i.d.—independent
  and identically distributed


               P(d | hi )        P(dj | hi )
                             j
Example:

• Hypothesis Prior over h1, …, h5 is
  {0.1,0.2,0.4,0.2,0.1}
• Data:



• Q1: After seeing d1, what is P(hi|d1)?
• Q2: After seeing d1, what is P(d2= |d1)?
Making Statistical Inferences
• Bayesian –
   – predictions made using all hypothesis, weighted by their probabilities

• MAP – maximum a posteriori
   – uses the single most probable hypothesis to make prediction
   – often much easier than Bayesian; as we get more and more data,
     closer to Bayesian optimal

• ML – maximum likelihood
   – assume uniform prior over H
   – when
NaĂŻve Bayes (20.2)
NaĂŻve Bayes
• aka Idiot Bayes
• particularly simple BN
• makes overly strong independence
  assumptions
• but works surprisingly well in practice…
Bayesian Diagnosis
• suppose we want to make a diagnosis D and there are n
  possible mutually exclusive diagnosis d1, …, dn
• suppose there are m boolean symptoms, E1, …, Em


                                    P(di )P(e1 ,..., e m | di )
        P(di | e1 ,..., em )
                                         P(e1 ,..., e m )

            how do we make diagnosis?


        we need:
                         P ( di )        P(e1 ,..., em | di )
NaĂŻve Bayes Assumption
• Assume each piece of evidence (symptom) is
  independent give the diagnosis
• then

                                           m
               P(e1 ,..., em | di )             P(ek | di )
                                          k 1



  what is the structure of the corresponding BN?
NaĂŻve Bayes Example

• possible diagnosis: Allergy, Cold and OK
• possible symptoms: Sneeze, Cough and Fever

                      Well           Cold       Allergy

       P(d)           0.9            0.05        0.05

    P(sneeze|d)       0.1            0.9         0.9

    P(cough|d)        0.1            0.8         0.7

     P(fever|d)       0.01           0.7         0.4

     my symptoms are: sneeze & cough, what is
     the diagnosis?
Learning the Probabilities
• aka parameter estimation
• we need
  – P(di) – prior
  – P(ek|di) – conditional probability
• use training data to estimate
Maximum Likelihood Estimate (MLE)
• use frequencies in training set to estimate:


                                       ni
                          p(di )
                                       N

                                            nik
                       p(e k | di )
                                            ni
  where nx is shorthand for the counts of events in
  training set
what is:         P(Allergy)?
Example:            P(Sneeze| Allergy)?
                    P(Cough| Allergy)?

   D       Sneeze          Cough                   Fever
 Allergy    yes                no                   no
  Well      yes                no                   no
 Allergy    yes                no                  yes
 Allergy    yes                no                   no
  Cold      yes                yes                 yes
 Allergy    yes                no                   no
  Well      no                 no                   no
  Well      no                 no                   no
 Allergy    no                 no                   no
 Allergy    yes                no                   no
Laplace Estimate (smoothing)
• use smoothing to eliminate zeros:


                                    ni 1       many other
                       p(di )                  smoothing
                                    N n        schemes…


                                       nik 1
                    p(e k | di )
                                       ni 2
  where n is number of possible values for d
  and e is assumed to have 2 possible values
Comments
• Generally works well despite blanket
  assumption of independence
• Experiments show competitive with decision
  trees on some well known test sets (UCI)
• handles noisy data
Learning more complex Bayesian
             networks
• Two subproblems:
• learning structure: combinatorial search over
  space of networks
• learning parameters values: easy if all of the
  variables are observed in the training set;
  harder if there are ‘hidden variables’

Weitere ähnliche Inhalte

Was ist angesagt?

Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural Networks
Francesco Collova'
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
Vishal Singh
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
Slideshare
 

Was ist angesagt? (20)

AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
 
Ai notes
Ai notesAi notes
Ai notes
 
Machine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural NetworksMachine Learning: Introduction to Neural Networks
Machine Learning: Introduction to Neural Networks
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic Regression
 
And or graph
And or graphAnd or graph
And or graph
 
Introduction to prolog
Introduction to prologIntroduction to prolog
Introduction to prolog
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade off
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
 
Classification and Regression
Classification and RegressionClassification and Regression
Classification and Regression
 
Types of Machine Learning
Types of Machine LearningTypes of Machine Learning
Types of Machine Learning
 
Reasoning in AI
Reasoning in AIReasoning in AI
Reasoning in AI
 
Decision Trees
Decision TreesDecision Trees
Decision Trees
 
State Space Representation and Search
State Space Representation and SearchState Space Representation and Search
State Space Representation and Search
 

Ähnlich wie Statistical learning

Ähnlich wie Statistical learning (20)

Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Introduction to Bayesian Methods
Introduction to Bayesian MethodsIntroduction to Bayesian Methods
Introduction to Bayesian Methods
 
Bayes 6
Bayes 6Bayes 6
Bayes 6
 
Induction
InductionInduction
Induction
 
NaiveBayes.ppt
NaiveBayes.pptNaiveBayes.ppt
NaiveBayes.ppt
 
NaiveBayes.ppt
NaiveBayes.pptNaiveBayes.ppt
NaiveBayes.ppt
 
NaiveBayes.ppt
NaiveBayes.pptNaiveBayes.ppt
NaiveBayes.ppt
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
NaĂŻve bayes
NaĂŻve bayesNaĂŻve bayes
NaĂŻve bayes
 
2죟차
2죟차2죟차
2죟차
 
Bayesian data analysis1
Bayesian data analysis1Bayesian data analysis1
Bayesian data analysis1
 
Tutorial 2 (mle + language models)
Tutorial 2 (mle + language models)Tutorial 2 (mle + language models)
Tutorial 2 (mle + language models)
 
A Gentle Introduction to Bayesian Nonparametrics
A Gentle Introduction to Bayesian NonparametricsA Gentle Introduction to Bayesian Nonparametrics
A Gentle Introduction to Bayesian Nonparametrics
 
M18 learning
M18 learningM18 learning
M18 learning
 
Uncertainty
UncertaintyUncertainty
Uncertainty
 

Mehr von 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
 
Logic agent
Logic agentLogic agent
Logic agent
Slideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
Slideshare
 
Neural networks
Neural networksNeural networks
Neural networks
Slideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
Slideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
Slideshare
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
Slideshare
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
Slideshare
 

Mehr von 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
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Input & output devices
Input & output devicesInput & output devices
Input & output devices
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
 

KĂźrzlich hochgeladen

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
 
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
 

KĂźrzlich hochgeladen (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
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 setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
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
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
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 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
 
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...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
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
 
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
 
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...
 

Statistical learning

  • 2. Statistical Approaches • Statistical Learning • NaĂŻve Bayes • Instance-based Learning • Neural Networks
  • 3. Example: Candy Bags • Candy comes in two flavors: cherry () and lime () • Candy is wrapped, can’t tell which flavor until opened • There are 5 kinds of bags of candy: – H1= all cherry (P(c|h1) = 1, P(l|h1) = 0) – H2= 75% cherry, 25% lime – H3= 50% cherry, 50% lime – H4= 25% cherry, 75% lime – H5= 100% lime • Given a new bag of candy, predict H • Observations: D1, D2 , D3, …
  • 4. Bayesian Learning • Calculate the probability of each hypothesis, given the data, and make prediction weighted by this probability (i.e. use all the hypothesis, not just the single best) P ( d|hi )P (hi ) P(hi | d) P ( d) P(d | hi )P(hi ) • Now, if we want to predict some unknown quantity X P( X | d) P( X |hi )P(hi | d) i
  • 5. Bayesian Learning cont. • Calculating P(h|d) P(hi | d) P(d | hi )P(hi ) likelihood prior • Assume the observations are i.i.d.—independent and identically distributed P(d | hi ) P(dj | hi ) j
  • 6. Example: • Hypothesis Prior over h1, …, h5 is {0.1,0.2,0.4,0.2,0.1} • Data: • Q1: After seeing d1, what is P(hi|d1)? • Q2: After seeing d1, what is P(d2= |d1)?
  • 7. Making Statistical Inferences • Bayesian – – predictions made using all hypothesis, weighted by their probabilities • MAP – maximum a posteriori – uses the single most probable hypothesis to make prediction – often much easier than Bayesian; as we get more and more data, closer to Bayesian optimal • ML – maximum likelihood – assume uniform prior over H – when
  • 9. NaĂŻve Bayes • aka Idiot Bayes • particularly simple BN • makes overly strong independence assumptions • but works surprisingly well in practice…
  • 10. Bayesian Diagnosis • suppose we want to make a diagnosis D and there are n possible mutually exclusive diagnosis d1, …, dn • suppose there are m boolean symptoms, E1, …, Em P(di )P(e1 ,..., e m | di ) P(di | e1 ,..., em ) P(e1 ,..., e m ) how do we make diagnosis? we need: P ( di ) P(e1 ,..., em | di )
  • 11. NaĂŻve Bayes Assumption • Assume each piece of evidence (symptom) is independent give the diagnosis • then m P(e1 ,..., em | di ) P(ek | di ) k 1 what is the structure of the corresponding BN?
  • 12. NaĂŻve Bayes Example • possible diagnosis: Allergy, Cold and OK • possible symptoms: Sneeze, Cough and Fever Well Cold Allergy P(d) 0.9 0.05 0.05 P(sneeze|d) 0.1 0.9 0.9 P(cough|d) 0.1 0.8 0.7 P(fever|d) 0.01 0.7 0.4 my symptoms are: sneeze & cough, what is the diagnosis?
  • 13. Learning the Probabilities • aka parameter estimation • we need – P(di) – prior – P(ek|di) – conditional probability • use training data to estimate
  • 14. Maximum Likelihood Estimate (MLE) • use frequencies in training set to estimate: ni p(di ) N nik p(e k | di ) ni where nx is shorthand for the counts of events in training set
  • 15. what is: P(Allergy)? Example: P(Sneeze| Allergy)? P(Cough| Allergy)? D Sneeze Cough Fever Allergy yes no no Well yes no no Allergy yes no yes Allergy yes no no Cold yes yes yes Allergy yes no no Well no no no Well no no no Allergy no no no Allergy yes no no
  • 16. Laplace Estimate (smoothing) • use smoothing to eliminate zeros: ni 1 many other p(di ) smoothing N n schemes… nik 1 p(e k | di ) ni 2 where n is number of possible values for d and e is assumed to have 2 possible values
  • 17. Comments • Generally works well despite blanket assumption of independence • Experiments show competitive with decision trees on some well known test sets (UCI) • handles noisy data
  • 18. Learning more complex Bayesian networks • Two subproblems: • learning structure: combinatorial search over space of networks • learning parameters values: easy if all of the variables are observed in the training set; harder if there are ‘hidden variables’