50% found this document useful (2 votes)
3K views

Hunt's Algorithm: D y (Y, Y, Y, ..., y

Hunt's algorithm recursively builds a decision tree by partitioning training records into purer subsets at each node. It creates leaf nodes when records at a node all belong to the same class or the node's data set is empty. Otherwise, it uses an attribute test to split the data and create child nodes for each outcome, applying the algorithm recursively to the child nodes. The example shows Hunt's algorithm building a decision tree to predict loan default using attributes like home ownership, marital status, and income level to split the data at each node.

Uploaded by

Raj Dhakal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
50% found this document useful (2 votes)
3K views

Hunt's Algorithm: D y (Y, Y, Y, ..., y

Hunt's algorithm recursively builds a decision tree by partitioning training records into purer subsets at each node. It creates leaf nodes when records at a node all belong to the same class or the node's data set is empty. Otherwise, it uses an attribute test to split the data and create child nodes for each outcome, applying the algorithm recursively to the child nodes. The example shows Hunt's algorithm building a decision tree to predict loan default using attributes like home ownership, marital status, and income level to split the data at each node.

Uploaded by

Raj Dhakal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Aakash Raj Dhakal

Hunt's Algorithm

A decision tree is grown in a recursive fashion by partitioning the training records


into successively purer subsets.Let D❑t be the set of training records that are
associated with node t and y={ y ❑1 , y ❑2 , y ❑3 , ... , y ❑c } be the class labels. The
following is a recursive definition of Hunt’s algorithm.

The general recursive procedure is defined as below:


1. If D❑t contains records that belong the same class y ❑t , then t is a leaf node
labeled as y ❑t
2. If D❑t is an empty set, then t is a leaf node labeled by the default class, yd
3. If D❑t contains records that belong to more than one class, use an attribute
test to split the data into smaller subsets.

Step 1: If all the records in D❑t belong to the same class y ❑t , then t is a leaf
node labeled as y ❑t .

Step 2: If D❑t contains records that belong to more than one class; an attribute test
condition is selected to partition the records into smaller subsets. A child node is
created for each outcome of the test condition and the records in D❑t are distributed
to the children based on the outcomes. The algorithm is then recursively applied to
each child node.

Top Down tree construction


BuildTree(Node t,Training database D,Split Selection Method S)
1.Apply S to D to find splitting criterion
2.if (t is not a leaf node)
a.Create child nodes of t
b.Partition D into children components
c.Recursive on each partition
3.endif

Example: Training set for predicting borrowers who will default on loan payments.
Aakash Raj Dhakal

Tid Home Owner Marital Status Annual Defaulted


Income Browser

1 Yes Single 125K No

2 No Married 100k No

3 No Single 70K No

4 Yes Married 120k No

5 No Divorced 95K Yes

6 No Married 60K No

7 Yes Divorced 220k No

8 No Single 85k Yes

9 No Married 75k No

10 No Single 90k Yes

1.Establishing single node for class label

Defaulted = No

2.Using test condition based on Home Owner

Home
Owner

Yes No

Defaulted=No Defaulted=No

3.Using test condition based on marital status


Aakash Raj Dhakal

Home
Owner
Ye No
s
Defaulted=N
o Marital
Status
Single Married
Divorced
Defaulted=Y Defaulted=N
es o
4.Using test condition based on Annual Income

Home
Owner
Ye No
s
Defaulted=N
o Marital
Status
Single Married
Divorced
Defaulted=N
Annual o
<80 Income >=80
K K
Defaulted=N Defaulted=Y
o es

You might also like