<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=C4.5_algorithm</id>
	<title>C4.5 algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=C4.5_algorithm"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=C4.5_algorithm&amp;action=history"/>
	<updated>2026-05-04T18:59:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=C4.5_algorithm&amp;diff=1425839&amp;oldid=prev</id>
		<title>imported&gt;Trulyy: Added image</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=C4.5_algorithm&amp;diff=1425839&amp;oldid=prev"/>
		<updated>2024-06-23T20:39:51Z</updated>

		<summary type="html">&lt;p&gt;Added image&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Algorithm for making decision trees}}&lt;br /&gt;
{{More footnotes|date=July 2008}}&lt;br /&gt;
[[File:Diagramm_beispiel_sarah_geht_segeln.png | thumb | right]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;C4.5&amp;#039;&amp;#039;&amp;#039; is an algorithm used to generate a [[decision tree]] developed by [[Ross Quinlan]].&amp;lt;ref&amp;gt;Quinlan, J. R. C4.5: &amp;#039;&amp;#039;Programs for Machine Learning&amp;#039;&amp;#039;. Morgan Kaufmann Publishers, 1993.&amp;lt;/ref&amp;gt; C4.5 is an extension of Quinlan&amp;#039;s earlier [[ID3 algorithm]]. The decision trees generated by C4.5 can be used for classification, and for this reason, C4.5 is often referred to as a [[Statistical classification|statistical classifier]]. In 2011, authors of the [[Weka (machine learning)|Weka]] machine learning software described the C4.5 algorithm as &amp;quot;a landmark decision tree program that is probably the machine learning workhorse most widely used in practice to date&amp;quot;.&amp;lt;ref&amp;gt;{{cite web |url=http://www.cs.waikato.ac.nz/~ml/weka/book.html |title=Data Mining: Practical machine learning tools and techniques, 3rd Edition |author=Ian H. Witten |author2=Eibe Frank |author3=Mark A. Hall  |year=2011 |publisher=Morgan Kaufmann, San Francisco | page=191 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It became quite popular after ranking #1 in the &amp;#039;&amp;#039;Top 10 Algorithms in Data Mining&amp;#039;&amp;#039; pre-eminent paper published by [[Springer Science+Business Media|Springer]] [[Lecture Notes in Computer Science|LNCS]] in 2008.&amp;lt;ref&amp;gt;[http://www.cs.umd.edu/~samir/498/10Algorithms-08.pdf Umd.edu - Top 10 Algorithms in Data Mining]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Algorithm==&lt;br /&gt;
C4.5 builds decision trees from a set of training data in the same way as [[ID3 algorithm|ID3]], using the concept of [[Entropy (information theory)|information entropy]].  The training data is a set &amp;lt;math&amp;gt;S = {s_1, s_2, ...}&amp;lt;/math&amp;gt; of already classified samples.  Each sample &amp;lt;math&amp;gt; s_i&amp;lt;/math&amp;gt; consists of a p-dimensional vector &amp;lt;math&amp;gt;(x_{1,i}, x_{2,i}, ...,x_{p,i}) &amp;lt;/math&amp;gt;, where the &amp;lt;math&amp;gt; x_j &amp;lt;/math&amp;gt; represent attribute values or [[Feature (machine learning)|features]] of the sample, as well as the class in which &amp;lt;math&amp;gt; s_i &amp;lt;/math&amp;gt; falls.&lt;br /&gt;
&lt;br /&gt;
At each node of the tree, C4.5 chooses the attribute of the data that most effectively splits its set of samples into subsets enriched in one class or the other.  The splitting criterion is the normalized [[Information gain in decision trees|information gain]] (difference in entropy). The attribute with the highest normalized information gain is chosen to make the decision. The C4.5 algorithm then [[Recursion (computer science)|recurses]] on the [[Partition of a set|partitioned]] sublists.&lt;br /&gt;
&lt;br /&gt;
This algorithm has a few [[Base case (recursion)|base cases]].&lt;br /&gt;
*All the samples in the list belong to the same class.  When this happens, it simply creates a leaf node for the decision tree saying to choose that class.&lt;br /&gt;
*None of the features provide any information gain.  In this case, C4.5 creates a decision node higher up the tree using the expected value of the class.&lt;br /&gt;
*Instance of previously unseen class encountered.  Again, C4.5 creates a decision node higher up the tree using the expected value.&lt;br /&gt;
&lt;br /&gt;
===Pseudocode===&lt;br /&gt;
&lt;br /&gt;
In [[pseudocode]], the general algorithm for building decision trees is:&amp;lt;ref&amp;gt;S.B. Kotsiantis, &amp;quot;Supervised Machine Learning: A Review of Classification Techniques&amp;quot;, &amp;#039;&amp;#039;Informatica&amp;#039;&amp;#039; 31(2007) 249-268, 2007&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Check for the above base cases.&lt;br /&gt;
#For each attribute &amp;#039;&amp;#039;a&amp;#039;&amp;#039;, find the normalized information gain ratio from splitting on &amp;#039;&amp;#039;a&amp;#039;&amp;#039;.&lt;br /&gt;
#Let &amp;#039;&amp;#039;a_best&amp;#039;&amp;#039; be the attribute with the highest normalized information gain.&lt;br /&gt;
#Create a decision &amp;#039;&amp;#039;node&amp;#039;&amp;#039; that splits on &amp;#039;&amp;#039;a_best&amp;#039;&amp;#039;.&lt;br /&gt;
#Recurse on the sublists obtained by splitting on &amp;#039;&amp;#039;a_best&amp;#039;&amp;#039;, and add those nodes as children of &amp;#039;&amp;#039;node&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Implementations==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;J48&amp;#039;&amp;#039;&amp;#039; is an [[open source]] [[Java (programming language)|Java]] implementation of the C4.5 algorithm in the [[Weka (machine learning)|Weka]] [[data mining]] tool.&lt;br /&gt;
&lt;br /&gt;
==Improvements from ID3 algorithm==&lt;br /&gt;
&lt;br /&gt;
C4.5 made a number of improvements to ID3.  Some of these are:&lt;br /&gt;
&lt;br /&gt;
* Handling both continuous and discrete attributes - In order to handle continuous attributes, C4.5 creates a threshold and then splits the list into those whose attribute value is above the threshold and those that are less than or equal to it.&amp;lt;ref&amp;gt;J. R. Quinlan. Improved use of continuous attributes in c4.5. Journal of Artificial Intelligence Research, 4:77-90, 1996.&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Handling training data with missing attribute values - C4.5 allows attribute values to be marked as ? for missing.  Missing attribute values are simply not used in gain and entropy calculations.&lt;br /&gt;
* Handling attributes with differing costs.&lt;br /&gt;
* Pruning trees after creation - C4.5 goes back through the tree once it&amp;#039;s been created and attempts to remove branches that do not help by replacing them with leaf nodes.&lt;br /&gt;
&lt;br /&gt;
==Improvements in C5.0/See5 algorithm==&lt;br /&gt;
&lt;br /&gt;
Quinlan went on to create C5.0 and See5 (C5.0 for Unix/Linux, See5 for Windows) which he markets commercially.  C5.0 offers a number of improvements on C4.5. Some of these are:&amp;lt;ref&amp;gt;[http://www.rulequest.com/see5-comparison.html Is See5/C5.0 Better Than C4.5?]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;M. Kuhn and K. Johnson, Applied Predictive Modeling, Springer 2013&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Speed - C5.0 is significantly faster than C4.5 (several orders of magnitude)&lt;br /&gt;
* Memory usage - C5.0 is more memory efficient than C4.5&lt;br /&gt;
* Smaller decision trees - C5.0 gets similar results to C4.5 with considerably smaller decision trees.&lt;br /&gt;
* Support for [[Boosting (machine learning)|boosting]] - Boosting improves the trees and gives them more accuracy.&lt;br /&gt;
* Weighting - C5.0 allows you to weight different cases and misclassification types.&lt;br /&gt;
* Winnowing - a C5.0 option automatically [[Winnow (algorithm)|winnow]]s the attributes to remove those that may be unhelpful.&lt;br /&gt;
&lt;br /&gt;
Source for a single-threaded Linux version of C5.0 is available under the [[GNU General Public License]] (GPL).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[ID3 algorithm]]&lt;br /&gt;
* [http://timesleuth-rule.sourceforge.net Modifying C4.5 to generate temporal and causal rules]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* Original implementation on Ross Quinlan&amp;#039;s homepage:  [http://www.rulequest.com/Personal/ http://www.rulequest.com/Personal/]&lt;br /&gt;
* [http://www.rulequest.com/see5-info.html See5 and C5.0]&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:C4.5 Algorithm}}&lt;br /&gt;
[[Category:Classification algorithms]]&lt;br /&gt;
[[Category:Decision trees]]&lt;br /&gt;
[[Category:Articles with example pseudocode]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Trulyy</name></author>
	</entry>
</feed>