Newer
Older
ai / lab8 / invest.py
@Andreas Jaggi Andreas Jaggi on 29 May 2006 735 bytes Added Lab8, an Decision Tree System (ID3)
## TESTING -----------------------------------------
## Construction d'un arbre de decision (ID3).
## Exemple: estimation du profit d'une entreprise informatique.

initID3([['down',  'old',  'no', 'software'],
	 ['down','midlife','yes','software'],
	 ['up',  'midlife','no', 'hardware'],
	 ['down','old',    'no', 'hardware'],
	 ['up',  'new',    'no', 'hardware'],
	 ['up',  'new',    'no', 'software'],
	 ['up',  'midlife','no', 'software'],
	 ['up',  'new',    'yes','software'],
	 ['down','midlife','yes','hardware'],
	 ['down','old',    'yes','software']],
	[['profit', 'down','up'],
	 ['age', 'old', 'midlife', 'new'],
	 ['competition', 'no', 'yes'],
	 ['type', 'software', 'hardware']])

buildDecisionTree()