From 91e2b5c8c01974771a04c17cfeb492e8900e69fd Mon Sep 17 00:00:00 2001 From: Parijat Mazumdar Date: Tue, 11 Mar 2014 12:25:39 +0530 Subject: [PATCH] algo added in brief --- .../multiclass/tree/ID3ClassifierTree.h | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/shogun/multiclass/tree/ID3ClassifierTree.h b/src/shogun/multiclass/tree/ID3ClassifierTree.h index 2d952222e33..e759d2f64bc 100644 --- a/src/shogun/multiclass/tree/ID3ClassifierTree.h +++ b/src/shogun/multiclass/tree/ID3ClassifierTree.h @@ -40,8 +40,31 @@ namespace shogun { -/** @brief class ID3ClassifierTree, implements classifier tree for discrete - * feature values using the ID3 algorithm. +/** @brief class ID3ClassifierTree, implements classifier tree for discrete feature + * values using the ID3 algorithm. The training algorithm implemented is as follows : + * + * function ID3 (R: a set of non-categorical attributes, + * C: the categorical attribute, + * S: a training set) returns a decision tree; + * begin + * If S consists of records all with the same value for + * the categorical attribute, + * return a single node with that value; + * If R is empty, then return a single node with as value + * the most frequent of the values of the categorical attribute + * that are found in records of S; [note that then there + * will be errors, that is, records that will be improperly + * classified]; + * Let D be the attribute with largest Gain(D,S) + * among attributes in R; + * Let \f${d_j| j=1,2, .., m}\f$ be the values of attribute D; + * Let \f${S_j| j=1,2, .., m}\f$ be the subsets of S consisting + * respectively of records with value dj for attribute D; + * Return a tree with root labeled D and arcs labeled + * \f$d_1, d_2, .., d_m\f$ going respectively to the trees + * ID3(R-{D}, C, \f$S_1\f$), .., ID3(R-{D}, C, \f$S_m\f$); + * end ID3; + * */ class CID3ClassifierTree : public CTreeMachine {