Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Machine Learning
  3. Decision Trees

Decision Trees

MITTypeScript

A Node.js library implementing Decision Tree (ID3/CART), Random Forest, and XGBoost algorithms with TypeScript support and automatic data type detection.

Visit WebsiteGitHubGitHub
220 stars45 forks0 contributors

What is Decision Trees?

Decision Tree is a Node.js library that implements three fundamental machine learning algorithms: Decision Tree (using ID3 and CART), Random Forest, and XGBoost. It allows developers to perform classification and regression tasks directly in JavaScript/TypeScript environments with automatic handling of both discrete and continuous data types. The library solves the problem of integrating machine learning into Node.js applications without relying on external Python or R dependencies.

Target Audience

JavaScript/TypeScript developers, full-stack engineers, and data scientists who need to incorporate machine learning models into Node.js or Bun applications, particularly those working on server-side prediction, data analysis tools, or real-time inference systems.

Value Proposition

Developers choose this library because it provides a native, type-safe implementation of popular ML algorithms with automatic algorithm selection, comprehensive performance optimizations, and seamless integration into modern JavaScript ecosystems. Its production-ready test suite and model persistence features offer reliability and flexibility not always found in other JavaScript ML libraries.

Overview

NodeJS Implementation of Decision Tree using ID3 Algorithm

Use Cases

Best For

  • Building classification models for categorical data like user preferences or survey responses
  • Implementing regression models for predicting continuous values such as prices or scores
  • Adding machine learning capabilities to Node.js backend services without external dependencies
  • Prototyping and experimenting with decision trees, random forests, or XGBoost in TypeScript
  • Educational purposes to understand ML algorithm implementations in JavaScript
  • Deploying lightweight ML models for real-time inference in web applications

Not Ideal For

  • Projects running on Node.js versions below 20 or requiring CommonJS modules, as it mandates ES modules and modern runtimes
  • Applications needing strict data validation and error handling for mission-critical ML, due to its permissive validation that can lead to silent failures
  • Large-scale machine learning tasks with datasets exceeding 100,000 samples, where Python libraries like scikit-learn offer superior performance and scalability
  • Teams requiring GPU acceleration or advanced ML features beyond tree-based algorithms, such as neural networks or deep learning

Pros & Cons

Pros

Automatic Algorithm Selection

Intelligently detects discrete vs. continuous features and auto-selects between ID3, CART, or hybrid algorithms, as shown in the autoDetectTypes and algorithm configuration options.

TypeScript-First Design

Provides full type definitions and IntelliSense support, with comprehensive examples in the README for both discrete and continuous data interfaces.

Performance Optimizations

Includes multi-level caching, memory-efficient data structures, and validated benchmarks for training and inference up to 100K samples, as detailed in performance tests.

Extensive Test Coverage

Boasts over 400 passing tests covering edge cases, model persistence, and continuous variables, ensuring reliability for production use.

Cons

Limited Data Validation

The README explicitly states it has minimal validation for features, target columns, and data types, risking unexpected behavior in production without manual checks.

Modern Runtime Dependency

Requires Node.js 20+ or Bun 1.0+, excluding projects on older Node.js versions or those using CommonJS modules, as it's ES modules only.

Performance Scalability Limits

Benchmarks show training times scaling to seconds for 100K+ samples, making it less efficient for very large datasets compared to optimized native ML libraries.

Frequently Asked Questions

Quick Stats

Stars220
Forks45
Contributors0
Open Issues3
Last commit5 months ago
CreatedSince 2013

Tags

#random-forest#classification#nodejs#typescript#xgboost#bun#regression#machine-learning#decision-tree

Built With

T
TypeScript
B
Bun
N
Node.js

Links & Resources

Website

Included in

Machine Learning72.2k
Auto-fetched 7 hours ago

Related Projects

PyTorch - Tensors and Dynamic neural networks in Python with strong GPU accelerationPyTorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Stars102,845
Forks29,156
Last commit7 hours ago
keraskeras

Deep Learning for humans

Stars64,321
Forks19,788
Last commit3 days ago
streamlitstreamlit

Streamlit — A faster way to build and share data apps.

Stars45,708
Forks4,374
Last commit12 hours ago
gradiogradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!

Stars43,488
Forks3,590
Last commit8 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub