fbpx
Wikipedia

ID3 algorithm

In decision tree learning, ID3 (Iterative Dichotomiser 3) is an algorithm invented by Ross Quinlan[1] used to generate a decision tree from a dataset. ID3 is the precursor to the C4.5 algorithm, and is typically used in the machine learning and natural language processing domain

Potential ID3-generated decision tree. Attributes are arranged as nodes by ability to classify examples. Values of attributes are represented by branches.

Algorithm edit

The ID3 algorithm begins with the original set   as the root node. On each iteration of the algorithm, it iterates through every unused attribute of the set   and calculates the entropy   or the information gain   of that attribute. It then selects the attribute which has the smallest entropy (or largest information gain) value. The set   is then split or partitioned by the selected attribute to produce subsets of the data. (For example, a node can be split into child nodes based upon the subsets of the population whose ages are less than 50, between 50 and 100, and greater than 100.) The algorithm continues to recurse on each subset, considering only attributes never selected before.

Recursion on a subset may stop in one of these cases:

  • every element in the subset belongs to the same class; in which case the node is turned into a leaf node and labelled with the class of the examples.
  • there are no more attributes to be selected, but the examples still do not belong to the same class. In this case, the node is made a leaf node and labelled with the most common class of the examples in the subset.
  • there are no examples in the subset, which happens when no example in the parent set was found to match a specific value of the selected attribute. An example could be the absence of a person among the population with age over 100 years. Then a leaf node is created and labelled with the most common class of the examples in the parent node's set.

Throughout the algorithm, the decision tree is constructed with each non-terminal node (internal node) representing the selected attribute on which the data was split, and terminal nodes (leaf nodes) representing the class label of the final subset of this branch.

Summary edit

  1. Calculate the entropy of every attribute   of the data set  .
  2. Partition ("split") the set   into subsets using the attribute for which the resulting entropy after splitting is minimized; or, equivalently, information gain is maximum.
  3. Make a decision tree node containing that attribute.
  4. Recurse on subsets using the remaining attributes.

Properties edit

 
ID3-generated decision tree used to determine whether a particular nucleotide pair within a pre-mRNA sequence corresponds to an mRNA splice site. This tree has been shown to have a 95% correct prediction rate.[2]

ID3 does not guarantee an optimal solution. It can converge upon local optima. It uses a greedy strategy by selecting the locally best attribute to split the dataset on each iteration. The algorithm's optimality can be improved by using backtracking during the search for the optimal decision tree at the cost of possibly taking longer.

ID3 can overfit the training data. To avoid overfitting, smaller decision trees should be preferred over larger ones.[further explanation needed] This algorithm usually produces small trees, but it does not always produce the smallest possible decision tree.

ID3 is harder to use on continuous data than on factored data (factored data has a discrete number of possible values, thus reducing the possible branch points). If the values of any given attribute are continuous, then there are many more places to split the data on this attribute, and searching for the best value to split by can be time-consuming.

Usage edit

The ID3 algorithm is used by training on a data set   to produce a decision tree which is stored in memory. At runtime, this decision tree is used to classify new test cases (feature vectors) by traversing the decision tree using the features of the datum to arrive at a leaf node.

The ID3 metrics edit

Entropy edit

Entropy   is a measure of the amount of uncertainty in the (data) set   (i.e. entropy characterizes the (data) set  ).

 

Where,

  •   – The current dataset for which entropy is being calculated
    • This changes at each step of the ID3 algorithm, either to a subset of the previous set in the case of splitting on an attribute or to a "sibling" partition of the parent in case the recursion terminated previously.
  •   – The set of classes in  
  •   – The proportion of the number of elements in class   to the number of elements in set  

When  , the set   is perfectly classified (i.e. all elements in   are of the same class).

In ID3, entropy is calculated for each remaining attribute. The attribute with the smallest entropy is used to split the set   on this iteration. Entropy in information theory measures how much information is expected to be gained upon measuring a random variable; as such, it can also be used to quantify the amount to which the distribution of the quantity's values is unknown. A constant quantity has zero entropy, as its distribution is perfectly known. In contrast, a uniformly distributed random variable (discretely or continuously uniform) maximizes entropy. Therefore, the greater the entropy at a node, the less information is known about the classification of data at this stage of the tree; and therefore, the greater the potential to improve the classification here.

As such, ID3 is a greedy heuristic performing a best-first search for locally optimal entropy values. Its accuracy can be improved by preprocessing the data.

Information gain edit

Information gain   is the measure of the difference in entropy from before to after the set   is split on an attribute  . In other words, how much uncertainty in   was reduced after splitting set   on attribute  .

 

Where,

  •   – Entropy of set  
  •   – The subsets created from splitting set   by attribute   such that  
  •   – The proportion of the number of elements in   to the number of elements in set  
  •   – Entropy of subset  

In ID3, information gain can be calculated (instead of entropy) for each remaining attribute. The attribute with the largest information gain is used to split the set   on this iteration.

See also edit

References edit

  1. ^ Quinlan, J. R. 1986. Induction of Decision Trees. Mach. Learn. 1, 1 (Mar. 1986), 81–106
  2. ^ Taggart, Allison J; DeSimone, Alec M; Shih, Janice S; Filloux, Madeleine E; Fairbrother, William G (2012-06-17). "Large-scale mapping of branchpoints in human pre-mRNA transcripts in vivo". Nature Structural & Molecular Biology. 19 (7): 719–721. doi:10.1038/nsmb.2327. ISSN 1545-9993. PMC 3465671. PMID 22705790.

Further reading edit

  • Mitchell, Tom Michael (1997). Machine Learning. New York, NY: McGraw-Hill. pp. 55–58. ISBN 0070428077. OCLC 36417892.
  • Grzymala-Busse, Jerzy W. (February 1993). "Selected Algorithms of Machine Learning from Examples" (PDF). Fundamenta Informaticae. 18 (2): 193–207 – via ResearchGate.

External links edit

  • Seminars – http://www2.cs.uregina.ca/
  • Description and examples – http://www.cise.ufl.edu/
  • Description and examples – http://www.cis.temple.edu/
  • Decision Trees and Political Party Classification

algorithm, decision, tree, learning, iterative, dichotomiser, algorithm, invented, ross, quinlan, used, generate, decision, tree, from, dataset, precursor, algorithm, typically, used, machine, learning, natural, language, processing, domainpotential, generated. In decision tree learning ID3 Iterative Dichotomiser 3 is an algorithm invented by Ross Quinlan 1 used to generate a decision tree from a dataset ID3 is the precursor to the C4 5 algorithm and is typically used in the machine learning and natural language processing domainPotential ID3 generated decision tree Attributes are arranged as nodes by ability to classify examples Values of attributes are represented by branches Contents 1 Algorithm 1 1 Summary 1 2 Properties 1 3 Usage 2 The ID3 metrics 2 1 Entropy 2 2 Information gain 3 See also 4 References 5 Further reading 6 External linksAlgorithm editThe ID3 algorithm begins with the original set S displaystyle S nbsp as the root node On each iteration of the algorithm it iterates through every unused attribute of the set S displaystyle S nbsp and calculates the entropy H S displaystyle mathrm H S nbsp or the information gain I G S displaystyle IG S nbsp of that attribute It then selects the attribute which has the smallest entropy or largest information gain value The set S displaystyle S nbsp is then split or partitioned by the selected attribute to produce subsets of the data For example a node can be split into child nodes based upon the subsets of the population whose ages are less than 50 between 50 and 100 and greater than 100 The algorithm continues to recurse on each subset considering only attributes never selected before Recursion on a subset may stop in one of these cases every element in the subset belongs to the same class in which case the node is turned into a leaf node and labelled with the class of the examples there are no more attributes to be selected but the examples still do not belong to the same class In this case the node is made a leaf node and labelled with the most common class of the examples in the subset there are no examples in the subset which happens when no example in the parent set was found to match a specific value of the selected attribute An example could be the absence of a person among the population with age over 100 years Then a leaf node is created and labelled with the most common class of the examples in the parent node s set Throughout the algorithm the decision tree is constructed with each non terminal node internal node representing the selected attribute on which the data was split and terminal nodes leaf nodes representing the class label of the final subset of this branch Summary edit Calculate the entropy of every attribute a displaystyle a nbsp of the data set S displaystyle S nbsp Partition split the set S displaystyle S nbsp into subsets using the attribute for which the resulting entropy after splitting is minimized or equivalently information gain is maximum Make a decision tree node containing that attribute Recurse on subsets using the remaining attributes Properties edit nbsp ID3 generated decision tree used to determine whether a particular nucleotide pair within a pre mRNA sequence corresponds to an mRNA splice site This tree has been shown to have a 95 correct prediction rate 2 ID3 does not guarantee an optimal solution It can converge upon local optima It uses a greedy strategy by selecting the locally best attribute to split the dataset on each iteration The algorithm s optimality can be improved by using backtracking during the search for the optimal decision tree at the cost of possibly taking longer ID3 can overfit the training data To avoid overfitting smaller decision trees should be preferred over larger ones further explanation needed This algorithm usually produces small trees but it does not always produce the smallest possible decision tree ID3 is harder to use on continuous data than on factored data factored data has a discrete number of possible values thus reducing the possible branch points If the values of any given attribute are continuous then there are many more places to split the data on this attribute and searching for the best value to split by can be time consuming Usage edit The ID3 algorithm is used by training on a data set S displaystyle S nbsp to produce a decision tree which is stored in memory At runtime this decision tree is used to classify new test cases feature vectors by traversing the decision tree using the features of the datum to arrive at a leaf node The ID3 metrics editEntropy edit Entropy H S displaystyle mathrm H S nbsp is a measure of the amount of uncertainty in the data set S displaystyle S nbsp i e entropy characterizes the data set S displaystyle S nbsp H S x X p x log 2 p x displaystyle mathrm H S sum x in X p x log 2 p x nbsp Where S displaystyle S nbsp The current dataset for which entropy is being calculated This changes at each step of the ID3 algorithm either to a subset of the previous set in the case of splitting on an attribute or to a sibling partition of the parent in case the recursion terminated previously X displaystyle X nbsp The set of classes in S displaystyle S nbsp p x displaystyle p x nbsp The proportion of the number of elements in class x displaystyle x nbsp to the number of elements in set S displaystyle S nbsp When H S 0 displaystyle mathrm H S 0 nbsp the set S displaystyle S nbsp is perfectly classified i e all elements in S displaystyle S nbsp are of the same class In ID3 entropy is calculated for each remaining attribute The attribute with the smallest entropy is used to split the set S displaystyle S nbsp on this iteration Entropy in information theory measures how much information is expected to be gained upon measuring a random variable as such it can also be used to quantify the amount to which the distribution of the quantity s values is unknown A constant quantity has zero entropy as its distribution is perfectly known In contrast a uniformly distributed random variable discretely or continuously uniform maximizes entropy Therefore the greater the entropy at a node the less information is known about the classification of data at this stage of the tree and therefore the greater the potential to improve the classification here As such ID3 is a greedy heuristic performing a best first search for locally optimal entropy values Its accuracy can be improved by preprocessing the data Information gain edit Information gain I G A displaystyle IG A nbsp is the measure of the difference in entropy from before to after the set S displaystyle S nbsp is split on an attribute A displaystyle A nbsp In other words how much uncertainty in S displaystyle S nbsp was reduced after splitting set S displaystyle S nbsp on attribute A displaystyle A nbsp I G S A H S t T p t H t H S H S A displaystyle IG S A mathrm H S sum t in T p t mathrm H t mathrm H S mathrm H S A nbsp Where H S displaystyle mathrm H S nbsp Entropy of set S displaystyle S nbsp T displaystyle T nbsp The subsets created from splitting set S displaystyle S nbsp by attribute A displaystyle A nbsp such that S t T t displaystyle S bigcup t in T t nbsp p t displaystyle p t nbsp The proportion of the number of elements in t displaystyle t nbsp to the number of elements in set S displaystyle S nbsp H t displaystyle mathrm H t nbsp Entropy of subset t displaystyle t nbsp In ID3 information gain can be calculated instead of entropy for each remaining attribute The attribute with the largest information gain is used to split the set S displaystyle S nbsp on this iteration See also editClassification and regression tree CART C4 5 algorithm Decision tree learning Decision tree modelReferences edit Quinlan J R 1986 Induction of Decision Trees Mach Learn 1 1 Mar 1986 81 106 Taggart Allison J DeSimone Alec M Shih Janice S Filloux Madeleine E Fairbrother William G 2012 06 17 Large scale mapping of branchpoints in human pre mRNA transcripts in vivo Nature Structural amp Molecular Biology 19 7 719 721 doi 10 1038 nsmb 2327 ISSN 1545 9993 PMC 3465671 PMID 22705790 Further reading editMitchell Tom Michael 1997 Machine Learning New York NY McGraw Hill pp 55 58 ISBN 0070428077 OCLC 36417892 Grzymala Busse Jerzy W February 1993 Selected Algorithms of Machine Learning from Examples PDF Fundamenta Informaticae 18 2 193 207 via ResearchGate External links editSeminars http www2 cs uregina ca Description and examples http www cise ufl edu Description and examples http www cis temple edu Decision Trees and Political Party Classification Retrieved from https en wikipedia org w index php title ID3 algorithm amp oldid 1195691925, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.