decision tree by python

Laurence Gonsalves clgonsal at alumni.uwaterloo.ca
Thu Nov 14 15:18:02 EST 2002


On Wed, 6 Nov 2002 16:06:14 -0500,
Chermside, Michael <mchermside at ingdirect.com> wrote:
> > i am trying to construct a decision and classifiy a set 
> > of data using GINI index.
> > Is there any references? 
>  
>  I'm really not quite sure what you're asking for. The phrase
>  "construct a decision" suggests that you're trying to build
>  some object... but I'm not sure what a "decision object" would
>  be. Alternatively, you may simply not be a native English
>  speaker and you simply meant you wanted to "make a decision".
>  That's fine, but without SOME SORT of description of WHAT
>  decision, it's hard to find a resource.

Or maybe they made typo. :-)

The subject says "decision tree", so I'm guessing they want to construct
a decision tree for classifying data using the GINI index.

The ID3 decision tree learning algorithm is described on this page:

  http://www.cs.tufts.edu/g/150ML/slides/id3.html

Converting it to Python isn't too difficult.

The books "Artificial Intelligence: A Modern Approach" by Stuart Russell
and Peter Norvig as well as "Machine Learning" by Tom Mitchell also have
sections on decision trees, with detailed explanations of the learning
algorithm.

Searching on Google for various combinations of "decision trees", "id3
algorithm", "python" and "gini index" turn up interesting stuff too. (if
you have "id3" in your query you might want to also throw in "-mp3"...)



More information about the Python-list mailing list