Skip to main content
. 2021 Apr 7;7:e424. doi: 10.7717/peerj-cs.424

Algorithm 1. Pseudo code for C4.5 decision tree algorithm.

Input: Dataset
Output: Decision tree
// Start
    for all attributes in data
        Calculate information gain
    end
        HG= Attribute with highest information gain
        Tree = Create a decision node for splitting attribute HG
        New data= Sub datasets based on HG
    for all New data
        Tree new= C4.5(New data)
        Attach tree to corresponding branch of Tree
    end
    return