ID3-based implementation of the ML Decision Tree algorithm
rubymldecision-treerubymachine-learning
Métricas principais
Crescimento de estrelas
Estrelas
1.5k
Forks
130
Crescimento semanal
—
Issues
7
5001k
mar. de 2011set. de 2013abr. de 2016nov. de 2018jun. de 2021dez. de 2023jul. de 2026
ArtefatosRubyGemsgem install decisiontree
README
Decision Tree
A Ruby library which implements ID3 (information gain) algorithm for decision tree learning. Currently, continuous and discrete datasets can be learned.
Discrete model assumes unique labels & can be graphed and converted into a png for visual analysis
Continuous looks at all possible values for a variable and iteratively chooses the best threshold between all possible assignments. This results in a binary tree which is partitioned by the threshold at every step. (e.g. temperate > 20C)
Features
ID3 algorithms for continuous and discrete cases, with support for inconsistent datasets.
Support for multiple, and symbolic outputs and graphing of continuous trees.
Returns default value when no branches are suitable for input
Implementation
Ruleset is a class that trains an ID3Tree with 2/3 of the training data, converts it into set of rules and prunes the rules with the remaining 1/3 of the training data (in a C4.5 way).
Bagging is a bagging-based trainer (quite obvious), which trains 10 Ruleset trainers and when predicting chooses the best output based on voting.