# mljs/ml

Machine learning tools in JavaScript

Repository: https://github.com/mljs/ml
Canonical: https://ross.abutalabs.com/products/ml
Language: JavaScript
License: MIT
License Family: permissive
Topics: machine-learning, ml, javascript
Last push: 2024-10-21T07:02:43+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4328, "days_push": 681, "days_rel": 681, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2715, forks 209 (observed 2026-08-28T04:07:12.047851+00:00)

## What it is
ml.js is an umbrella library bundling the mljs organization's machine learning tools for JavaScript, including clustering, classification, regression, neural networks, and optimization algorithms. It is primarily maintained for browser use via a UMD build exposing a global ML variable, while Node.js users are directed to the individual ml-* npm packages.

## Use cases
- run machine learning in the browser with javascript
- cluster data with k-means or hierarchical clustering in js
- train a decision tree or random forest classifier in javascript
- fit linear or polynomial regression models in the browser
- do PCA dimensionality reduction in javascript
- build a simple feedforward neural network in js
- evaluate classifiers with a confusion matrix and cross-validation

## When to choose
- you need classic ML algorithms (PCA, KMeans, KNN, random forests, regression) running client-side in a browser
- you want a single script tag with a global ML object and no build tooling
- you prefer lightweight modular ml-* npm packages for Node.js projects

## When to avoid
- you need deep learning with GPU acceleration or large-scale training
- you work primarily in Python with scikit-learn or PyTorch ecosystems
- you need the latest algorithms or frequent updates, since sub-packages on npm are maintained more actively

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, data-science, math
- domain: machine-learning, data-science, web-development
- platform: browser
- tags: javascript, browser-ml, clustering, regression, neural-networks, pca, decision-trees, random-forest, naive-bayes, knn, k-means, umd, nodejs

## Member repositories
- mljs/ml (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:12.047851+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:15:30.855705+00:00, confidence not recorded.
  - readme: https://github.com/mljs/ml (fetched 2026-08-28T04:07:12.047851+00:00, sha f7d1cb30cb7e)
  - registry_npm: https://registry.npmjs.org/ml (fetched 2026-08-29T09:58:51.688105+00:00, sha c04e46cba264)
- Data as of 2026-08-30T08:39:29.467469+00:00.
