SAS>> ID3>> 返回
项目作者: m-pana

项目描述 :
MATLAB implementation of the ID3 algorithm, extended to support numerical attributes.
高级语言: MATLAB
项目地址: git://github.com/m-pana/ID3.git
创建时间: 2020-09-17T13:22:12Z
项目社区:https://github.com/m-pana/ID3

开源协议:MIT License

下载


ID3 Decision Tree algorithm

A MATLAB implementation of the ID3 decision tree building algorithm for classification tasks.
The algorithm was extended to include the handling of numerical attributes, as in the C4.5 evolution of the original ID3 algorithm. However, this implementation does not include features such as a-posteriori pruning.

MATLAB scripts

  • decision_tree_classifier_main.m The main script to launch the program
  • classifier.m Performs the classification task given a tree representation and a sample to classify. Returns the label predicted for the given sample
  • construct_tree.m Recursively construct a decision tree classifier based on a given dataset and a set of labels
  • preprocess_numerical.m Preprocess a numerical feature to adapt it to the ID3 algorithm
  • get_prob_vect.m and H.m are simple utility functions to create probability vectors out of a set of data and to compute the entropy of an array, respectively

Input/output format

Training data and labels should be provided to construct_tree as a Nm and m* sized matrix and array respectively. Labels should be in integer format.
Predicted label is returned as a single integer.