OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Decision Tree

Decision Tree is a Ruby library that implements ID3 decision-tree learning for discrete and continuous datasets, with prediction, rule-based pruning, bagging, and tree-visualization support.

Independent OpenViST project profile, based on linked sources.

Decision Tree — Ruby-based classification tasks with discrete or continuous input data
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a Ruby project needs ID3 classification from labeled data and benefits from threshold-based continuous splits, rule pruning, bagging, or tree visualization.

Who it is for

  • Ruby developers building classifiers from labeled examples.
  • Practitioners who want to inspect learned decision trees visually.

Documented uses

  • Train a classifier using discrete attributes, continuous values, or both.
  • Predict an output label for an input row, with a default for unmatched branches.
  • Train pruned rule sets or combine ten rule-set trainers through voting.
  • Visualize learned trees, including continuous trees.
Before you choose

Requirements & limits

The project identifies its license as MIT.

  • Continuous inputs are split using selected thresholds; discrete attributes use discrete tree handling.
  • The README describes a Ruleset workflow that uses two-thirds of the data for training and the remainder for rule pruning.
  • Bagging trains ten Ruleset trainers and selects predictions by voting.
  • Graph visualization relies on a Graphviz component.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and query an ID3 tree in Ruby

Create a tree from labeled examples, train it, and request a prediction.

Before you start

  • Ruby code that can require the decisiontree library.
  • An attribute list and labeled training rows, with data types identified as discrete or continuous.

Steps

  1. Require the decisiontree library.

  2. Create an ID3Tree with the attributes, training rows, a default label, and the relevant data type.

  3. Call train on the tree.

  4. Pass an input row to predict and read the returned label.

Expected outcome

A trained ID3 tree returns a predicted label for an input; the configured default is used when no branch is suitable.

Guide limitations

  • The guide covers the README's demonstrated tree workflow, not installation or dependency setup.
  • The examples use labeled data and specify attribute types.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
3 November 2026
Original website title
igrigorik/decisiontree · Official homepage title · retained in its source language