SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
Module
          12
Machine Learning
        Version 2 CSE IIT, Kharagpur
Lesson
             35
Rule Induction and
  Decision Tree - I
          Version 2 CSE IIT, Kharagpur
12.3 Decision Trees
Decision trees are a class of learning models that are more robust to noise as well as more
powerful as compared to concept learning. Consider the problem of classifying a star
based on some astronomical measurements. It can naturally be represented by the
following set of decisions on each measurement arranged in a tree like fashion.


                                        Luminosity

                      Mass <= T1                                > T1

     <= T2                                   > T2                       Type C


    Type A                                   Type B

12.3.1 Decision Tree: Definition
•   A decision-tree learning algorithm approximates a target concept using a tree
    representation, where each internal node corresponds to an attribute, and every
    terminal node corresponds to a class.
•   There are two types of nodes:
        o Internal node.- Splits into different branches according to the different values
           the corresponding attribute can take. Example: luminosity <= T1 or
           luminosity > T1.
        o Terminal Node.- Decides the class assigned to the example.

12.3.2 Classifying Examples Using Decision Tree
To classify an example X we start at the root of the tree, and check the value of that
attribute on X. We follow the branch corresponding to that value and jump to the next
node. We continue until we reach a terminal node and take that class as our best
prediction.




                                                           Version 2 CSE IIT, Kharagpur
X = (Luminosity <= T1, Mass > T2)

                                    Luminosity

                             <= T1                    > T1
                      M as s

              <= T2                  > T2                         Type C


                                       Type B                        Assigned Class
      Type A

Decision trees adopt a DNF (Disjunctive Normal Form) representation. For a fixed class,
every branch from the root of the tree to a terminal node with that class is a conjunction
of attribute values; different branches ending in that class form a disjunction.

In the following example, the rules for class A are: (~X1 & ~x2) OR (X1 & ~x3)
                                   x1
                         0                    1
              x                                             x

      0                   1                       0                  1

                         B                     A                     C


12.3.3 Decision Tree Construction
There are different ways to construct trees from data. We will concentrate on the top-
down, greedy search approach:

Basic idea:

 1. Choose the best attribute a* to place at the root of the tree.


                                                                Version 2 CSE IIT, Kharagpur
2. Separate training set D into subsets {D1, D2, .., Dk} where each subset Di contains
     examples having the same value for a*

       3. Recursively apply the algorithm on each new subset until examples have the same
     class or there are few of them.

     Illustration:




            t2                                                 Class P: Poisonous
humidity
                                                                Class N: Non-
            t3                                                  poisonous



                               t1        size


     Attributes: size and humidity.
     Size has two values: >t1 or <= t1
     Humidity has three values: >t2, (>t3 and <=t2), <= t3

                                            Suppose we choose size as the best

           t2
                                                                  size
           t3
                                                      <= T1               > T1

                          t1                             ?
                                                                                    P
             Class P: poisonous
             Class N: not-poisonous




                                                              Version 2 CSE IIT, Kharagpur
Suppose we choose humidity as the next best


    t2
                                                               size
    t3
                                                <= T1                    > T1

                    t1                         humidity
                                                                                  P
                                 >t2                   <= t3
                                           > t3 & <= t2

                                   N             P            N
Steps:

•   Create a root for the tree
•    If all examples are of the same class or the number of examples is below a threshold
    return that class
•    If no attributes available return majority class
•    Let a* be the best attribute
•    For each possible value v of a*
         • Add a branch below a* labeled “a = v”
         • Let Sv be the subsets of example where attribute a*=v
         • Recursively apply the algorithm to Sv




                                                          Version 2 CSE IIT, Kharagpur

Contenu connexe

Tendances

CommunicationComplexity1_jieren
CommunicationComplexity1_jierenCommunicationComplexity1_jieren
CommunicationComplexity1_jierenjie ren
 
Kernels and Support Vector Machines
Kernels and Support Vector  MachinesKernels and Support Vector  Machines
Kernels and Support Vector MachinesEdgar Marca
 
Hands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in PythonHands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in PythonChun-Ming Chang
 
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...CSCJournals
 
Support vector machine
Support vector machineSupport vector machine
Support vector machinePrasenjit Dey
 
Machine Learning and Data Mining - Decision Trees
Machine Learning and Data Mining - Decision TreesMachine Learning and Data Mining - Decision Trees
Machine Learning and Data Mining - Decision Treeswebisslides
 
20070823
2007082320070823
20070823neostar
 
Numerical solution of fuzzy hybrid differential equation by third order runge...
Numerical solution of fuzzy hybrid differential equation by third order runge...Numerical solution of fuzzy hybrid differential equation by third order runge...
Numerical solution of fuzzy hybrid differential equation by third order runge...Alexander Decker
 
11.numerical solution of fuzzy hybrid differential equation by third order ru...
11.numerical solution of fuzzy hybrid differential equation by third order ru...11.numerical solution of fuzzy hybrid differential equation by third order ru...
11.numerical solution of fuzzy hybrid differential equation by third order ru...Alexander Decker
 
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...Alexander Decker
 
Combinatorial Problems2
Combinatorial Problems2Combinatorial Problems2
Combinatorial Problems23ashmawy
 
Probabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsProbabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsSelman Bozkır
 
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...Lushanthan Sivaneasharajah
 

Tendances (18)

CommunicationComplexity1_jieren
CommunicationComplexity1_jierenCommunicationComplexity1_jieren
CommunicationComplexity1_jieren
 
E2
E2E2
E2
 
Kernels and Support Vector Machines
Kernels and Support Vector  MachinesKernels and Support Vector  Machines
Kernels and Support Vector Machines
 
Hands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in PythonHands-on Tutorial of Machine Learning in Python
Hands-on Tutorial of Machine Learning in Python
 
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...
Time Domain Signal Analysis Using Modified Haar and Modified Daubechies Wavel...
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Machine Learning and Data Mining - Decision Trees
Machine Learning and Data Mining - Decision TreesMachine Learning and Data Mining - Decision Trees
Machine Learning and Data Mining - Decision Trees
 
Strings
StringsStrings
Strings
 
Strings
StringsStrings
Strings
 
20070823
2007082320070823
20070823
 
Numerical solution of fuzzy hybrid differential equation by third order runge...
Numerical solution of fuzzy hybrid differential equation by third order runge...Numerical solution of fuzzy hybrid differential equation by third order runge...
Numerical solution of fuzzy hybrid differential equation by third order runge...
 
11.numerical solution of fuzzy hybrid differential equation by third order ru...
11.numerical solution of fuzzy hybrid differential equation by third order ru...11.numerical solution of fuzzy hybrid differential equation by third order ru...
11.numerical solution of fuzzy hybrid differential equation by third order ru...
 
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...
11.[8 17]numerical solution of fuzzy hybrid differential equation by third or...
 
Combinatorial Problems2
Combinatorial Problems2Combinatorial Problems2
Combinatorial Problems2
 
Probabilistic information retrieval models & systems
Probabilistic information retrieval models & systemsProbabilistic information retrieval models & systems
Probabilistic information retrieval models & systems
 
Svm algorithm
Svm algorithmSvm algorithm
Svm algorithm
 
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
Application of Fisher Linear Discriminant Analysis to Speech/Music Classifica...
 
Ai unit-3
Ai unit-3Ai unit-3
Ai unit-3
 

En vedette (9)

Lesson 20
Lesson 20Lesson 20
Lesson 20
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Lesson 23
Lesson 23Lesson 23
Lesson 23
 
Lesson 19
Lesson 19Lesson 19
Lesson 19
 
Lesson 25
Lesson 25Lesson 25
Lesson 25
 
Lesson 21
Lesson 21Lesson 21
Lesson 21
 
Inaugural Addresses
Inaugural AddressesInaugural Addresses
Inaugural Addresses
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similaire à Lesson 35

CLIQUE Automatic subspace clustering of high dimensional data for data mining...
CLIQUE Automatic subspace clustering of high dimensional data for data mining...CLIQUE Automatic subspace clustering of high dimensional data for data mining...
CLIQUE Automatic subspace clustering of high dimensional data for data mining...Raed Aldahdooh
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorizationmidi
 
Neural network precept diagnosis on petrochemical pipelines for quality maint...
Neural network precept diagnosis on petrochemical pipelines for quality maint...Neural network precept diagnosis on petrochemical pipelines for quality maint...
Neural network precept diagnosis on petrochemical pipelines for quality maint...Alexander Decker
 
Mining Implications from Lattices of Closed Trees
Mining Implications from Lattices of Closed TreesMining Implications from Lattices of Closed Trees
Mining Implications from Lattices of Closed TreesAlbert Bifet
 
20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared verHsing-chuan Hsieh
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAminaRepo
 

Similaire à Lesson 35 (8)

CLIQUE Automatic subspace clustering of high dimensional data for data mining...
CLIQUE Automatic subspace clustering of high dimensional data for data mining...CLIQUE Automatic subspace clustering of high dimensional data for data mining...
CLIQUE Automatic subspace clustering of high dimensional data for data mining...
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorization
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
Decision Trees.ppt
Decision Trees.pptDecision Trees.ppt
Decision Trees.ppt
 
Neural network precept diagnosis on petrochemical pipelines for quality maint...
Neural network precept diagnosis on petrochemical pipelines for quality maint...Neural network precept diagnosis on petrochemical pipelines for quality maint...
Neural network precept diagnosis on petrochemical pipelines for quality maint...
 
Mining Implications from Lattices of Closed Trees
Mining Implications from Lattices of Closed TreesMining Implications from Lattices of Closed Trees
Mining Implications from Lattices of Closed Trees
 
20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver
 
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reductionAaa ped-17-Unsupervised Learning: Dimensionality reduction
Aaa ped-17-Unsupervised Learning: Dimensionality reduction
 

Plus de Avijit Kumar (16)

Lesson 24
Lesson 24Lesson 24
Lesson 24
 
Lesson 22
Lesson 22Lesson 22
Lesson 22
 
Lesson 26
Lesson 26Lesson 26
Lesson 26
 
Lesson 27
Lesson 27Lesson 27
Lesson 27
 
Lesson 28
Lesson 28Lesson 28
Lesson 28
 
Lesson 29
Lesson 29Lesson 29
Lesson 29
 
Lesson 30
Lesson 30Lesson 30
Lesson 30
 
Lesson 31
Lesson 31Lesson 31
Lesson 31
 
Lesson 32
Lesson 32Lesson 32
Lesson 32
 
Lesson 33
Lesson 33Lesson 33
Lesson 33
 
Lesson 36
Lesson 36Lesson 36
Lesson 36
 
Lesson 37
Lesson 37Lesson 37
Lesson 37
 
Lesson 39
Lesson 39Lesson 39
Lesson 39
 
Lesson 38
Lesson 38Lesson 38
Lesson 38
 
Lesson 41
Lesson 41Lesson 41
Lesson 41
 
Lesson 40
Lesson 40Lesson 40
Lesson 40
 

Dernier

digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingrajputmeenakshi733
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationAnamaria Contreras
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024Adnet Communications
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Peter Ward
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsKnowledgeSeed
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxRakhi Bazaar
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamArik Fletcher
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfASGITConsulting
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...ssuserf63bd7
 
1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdfShaun Heinrichs
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfJamesConcepcion7
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...ssuserf63bd7
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environmentelijahj01012
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxmbikashkanyari
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOne Monitar
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsIndiaMART InterMESH Limited
 
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...Operational Excellence Consulting
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfDanny Diep To
 

Dernier (20)

digital marketing , introduction of digital marketing
digital marketing , introduction of digital marketingdigital marketing , introduction of digital marketing
digital marketing , introduction of digital marketing
 
WAM Corporate Presentation April 12 2024.pdf
WAM Corporate Presentation April 12 2024.pdfWAM Corporate Presentation April 12 2024.pdf
WAM Corporate Presentation April 12 2024.pdf
 
PSCC - Capability Statement Presentation
PSCC - Capability Statement PresentationPSCC - Capability Statement Presentation
PSCC - Capability Statement Presentation
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024TriStar Gold Corporate Presentation - April 2024
TriStar Gold Corporate Presentation - April 2024
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...
 
Introducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applicationsIntroducing the Analogic framework for business planning applications
Introducing the Analogic framework for business planning applications
 
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptxGo for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
Go for Rakhi Bazaar and Pick the Latest Bhaiya Bhabhi Rakhi.pptx
 
Technical Leaders - Working with the Management Team
Technical Leaders - Working with the Management TeamTechnical Leaders - Working with the Management Team
Technical Leaders - Working with the Management Team
 
Types of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdfTypes of Cyberattacks - ASG I.T. Consulting.pdf
Types of Cyberattacks - ASG I.T. Consulting.pdf
 
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
Intermediate Accounting, Volume 2, 13th Canadian Edition by Donald E. Kieso t...
 
1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf1911 Gold Corporate Presentation Apr 2024.pdf
1911 Gold Corporate Presentation Apr 2024.pdf
 
WSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdfWSMM Technology February.March Newsletter_vF.pdf
WSMM Technology February.March Newsletter_vF.pdf
 
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
Horngren’s Financial & Managerial Accounting, 7th edition by Miller-Nobles so...
 
Cyber Security Training in Office Environment
Cyber Security Training in Office EnvironmentCyber Security Training in Office Environment
Cyber Security Training in Office Environment
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
 
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring CapabilitiesOnemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
Onemonitar Android Spy App Features: Explore Advanced Monitoring Capabilities
 
Welding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan DynamicsWelding Electrode Making Machine By Deccan Dynamics
Welding Electrode Making Machine By Deccan Dynamics
 
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
The McKinsey 7S Framework: A Holistic Approach to Harmonizing All Parts of th...
 
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdfGUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
GUIDELINES ON USEFUL FORMS IN FREIGHT FORWARDING (F) Danny Diep Toh MBA.pdf
 

Lesson 35

  • 1. Module 12 Machine Learning Version 2 CSE IIT, Kharagpur
  • 2. Lesson 35 Rule Induction and Decision Tree - I Version 2 CSE IIT, Kharagpur
  • 3. 12.3 Decision Trees Decision trees are a class of learning models that are more robust to noise as well as more powerful as compared to concept learning. Consider the problem of classifying a star based on some astronomical measurements. It can naturally be represented by the following set of decisions on each measurement arranged in a tree like fashion. Luminosity Mass <= T1 > T1 <= T2 > T2 Type C Type A Type B 12.3.1 Decision Tree: Definition • A decision-tree learning algorithm approximates a target concept using a tree representation, where each internal node corresponds to an attribute, and every terminal node corresponds to a class. • There are two types of nodes: o Internal node.- Splits into different branches according to the different values the corresponding attribute can take. Example: luminosity <= T1 or luminosity > T1. o Terminal Node.- Decides the class assigned to the example. 12.3.2 Classifying Examples Using Decision Tree To classify an example X we start at the root of the tree, and check the value of that attribute on X. We follow the branch corresponding to that value and jump to the next node. We continue until we reach a terminal node and take that class as our best prediction. Version 2 CSE IIT, Kharagpur
  • 4. X = (Luminosity <= T1, Mass > T2) Luminosity <= T1 > T1 M as s <= T2 > T2 Type C Type B Assigned Class Type A Decision trees adopt a DNF (Disjunctive Normal Form) representation. For a fixed class, every branch from the root of the tree to a terminal node with that class is a conjunction of attribute values; different branches ending in that class form a disjunction. In the following example, the rules for class A are: (~X1 & ~x2) OR (X1 & ~x3) x1 0 1 x x 0 1 0 1 B A C 12.3.3 Decision Tree Construction There are different ways to construct trees from data. We will concentrate on the top- down, greedy search approach: Basic idea: 1. Choose the best attribute a* to place at the root of the tree. Version 2 CSE IIT, Kharagpur
  • 5. 2. Separate training set D into subsets {D1, D2, .., Dk} where each subset Di contains examples having the same value for a* 3. Recursively apply the algorithm on each new subset until examples have the same class or there are few of them. Illustration: t2 Class P: Poisonous humidity Class N: Non- t3 poisonous t1 size Attributes: size and humidity. Size has two values: >t1 or <= t1 Humidity has three values: >t2, (>t3 and <=t2), <= t3 Suppose we choose size as the best t2 size t3 <= T1 > T1 t1 ? P Class P: poisonous Class N: not-poisonous Version 2 CSE IIT, Kharagpur
  • 6. Suppose we choose humidity as the next best t2 size t3 <= T1 > T1 t1 humidity P >t2 <= t3 > t3 & <= t2 N P N Steps: • Create a root for the tree • If all examples are of the same class or the number of examples is below a threshold return that class • If no attributes available return majority class • Let a* be the best attribute • For each possible value v of a* • Add a branch below a* labeled “a = v” • Let Sv be the subsets of example where attribute a*=v • Recursively apply the algorithm to Sv Version 2 CSE IIT, Kharagpur