JavaScript Machine Learning APIs
Explore machine learning APIs in JavaScript and TypeScript with @kanaries/ml, including clustering, classification, anomaly detection, dimensionality reduction, and workflow utilities.
Module overview
This page is the entry point to the full @kanaries/ml API catalog. It helps JavaScript and TypeScript teams choose the right algorithm family before diving into individual estimators such as K-Means, Logistic Regression, Isolation Forest, PCA, or k-Nearest Neighbors.
Use this catalog when you already know the kind of problem you need to solve, such as:
- classification or regression on tabular data
- clustering or segmentation without labels
- anomaly detection on product, telemetry, or transaction data
- dimensionality reduction for embeddings, charts, or preprocessing
- utility workflows such as non-blocking execution in browser or Node.js apps
JavaScript implementation
@kanaries/ml provides a scikit-learn-like machine learning API for JavaScript and TypeScript so teams can build ML workflows directly in browser applications and Node.js services. Instead of treating ML as a separate Python-only layer, you can keep feature engineering, inference logic, interactive visualizations, and product code inside the same JS stack.
This is especially useful when someone searches for "machine learning in JavaScript", "TypeScript machine learning APIs", or "scikit-learn for JavaScript" and needs a practical module map rather than a single algorithm page.
Quick navigation
- Clusters: segment unlabeled data with K-Means, HDBSCAN, Mean Shift, OPTICS, and initialization helpers.
- Decomposition: reduce dimensions with PCA, Sparse PCA, and Truncated SVD.
- Ensemble: use Isolation Forest, AdaBoost, random forest, and bagging models for anomaly detection, classification, and regression.
- Linear: start with linear regression, logistic regression, regularized regression, and linear classification baselines.
- Metrics: evaluate classification, regression, clustering, curves, and distance functions.
- Manifold: build lower-dimensional embeddings for visualization and neighborhood analysis.
- Neighbors: run k-nearest neighbors and fast nearest-neighbor search structures.
- SVM: train support vector models for classification and regression.
- Tree: use interpretable decision tree and extra tree models.
- Bayes: apply naive Bayes models to binary or categorical features.
- Neural Network: learn compact representations with Bernoulli RBM.
- Semi-Supervised: spread labels through partially labeled datasets.
- Utils: use preprocessing, sampling, model selection, statistics, and async workflow helpers.
- Algebra: use lightweight matrix helpers such as transpose, determinants, and inverse.
- KMath: compute lightweight descriptive statistics.
Detailed module guide
How to choose a module
- Start from the task type: classification, regression, clustering, anomaly detection, embedding, or workflow support.
- Open the matching module page and compare one simple baseline against one stronger alternative.
- Read the algorithm-specific guidance to balance model quality with browser latency, Node.js throughput, and implementation complexity.
Recommended learning path
Build JavaScript Machine Learning
Discover how to train and deploy machine learning models in JavaScript and TypeScript using @kanaries/ml, including installation, core features, tutorials, and API references.
Clustering
Explore clustering algorithms in JavaScript and TypeScript with @kanaries/ml, including K-Means, DBSCAN, HDBSCAN, Mean Shift, OPTICS, and clustering utilities.