Hello, I have a previously done implementation for ID3 in C++. Depending on your requirements I will modify and enhance current implementation.
Best Regards
Sample Code:
typedef vector<string> Record;
typedef vector<Record> Table;
typedef set<int> IndexSet;
class TreeNode {
int attr_idx; // decision attribute index
string attr_value; // decision attribute value
vector<TreeNode*> children; // child nodes vector, empty if leaf node
string class_value; // classification value, only used if not leaf node
public:
TreeNode(string attr_value, IndexSet& rows, IndexSet& cols);
string classify(Record& record);
void print(ostream& os, int level = 0);
};