JavaScript Machine Learning API Reference
Explore the @kanaries/ml API for clustering, classification, anomaly detection, and more in JavaScript and TypeScript.
@kanaries/ml API Reference
This catalog describes every module available in @kanaries/ml so you can quickly locate the algorithm or utility that fits your JavaScript or TypeScript project. Each section below links to a detailed page covering parameters, usage patterns, and practical tips.
- Clusters – Implement k-means, DBSCAN, spectral clustering, and other unsupervised techniques for segmentation and feature discovery.
- Decomposition – Run dimensionality reduction methods such as PCA and SVD directly in the browser or Node.js.
- Ensemble – Combine multiple estimators including Isolation Forest and AdaBoost for robust anomaly detection and boosting workflows.
- Linear – Access regression and classification algorithms like Linear Regression, Lasso, and Logistic Regression with sklearn-like APIs.
- Manifold – Visualize high-dimensional data using t-SNE, Isomap, and related manifold learning approaches.
- Neighbors – Use k-nearest neighbors for search, recommendation, and classification tasks.
- SVM – Train support vector machines for high-margin classification and regression scenarios.
- Tree – Build decision trees and random forests for interpretable models and tabular data analysis.
- Bayes – Apply naive Bayes and probabilistic models to text classification, spam detection, and more.
- NeuralNetwork – Prototype lightweight neural networks tailored for in-browser inference.
- Utils – Leverage preprocessing helpers, metrics, and shared utilities to streamline your ML pipelines.
- SemiSupervised – Combine labeled and unlabeled data to boost performance in low-label environments.
Looking for inspiration? The Getting Started guide and examples directory provide end-to-end workflows you can adapt for your application.
How to work with this API catalog
Use this page to map business problems to the right @kanaries/ml algorithm family before diving into constructor parameters.
Selection checklist
- Identify your task type first: classification, regression, clustering, dimensionality reduction, anomaly detection, or utility workflow support.
- Start with one simple baseline model and one stronger alternative from the same module.
- Evaluate model quality together with runtime constraints such as browser latency, Node.js throughput, and bundle size.
Practical implementation flow
- Open the module page that matches your task and read the algorithm-specific "when to use" guidance.
- Build a minimal
fit/predictpipeline and validate it on holdout data. - Tune model settings and deployment strategy (browser worker vs Node.js service) before production rollout.
Search intents this page targets
javascript machine learning api referencetypescript machine learning algorithmsscikit-learn style api for javascript@kanaries/ml algorithm documentation
FAQ
What problem does JavaScript Machine Learning API Reference solve in JavaScript machine learning projects?
JavaScript Machine Learning API Reference helps teams implement production-ready ML workflows in browser and Node.js environments with a familiar scikit-learn-style API.
When should I choose JavaScript Machine Learning API Reference instead of other Documentation algorithms?
Use JavaScript Machine Learning API Reference when it best matches your data shape, labeling strategy, and runtime constraints. Benchmark against at least one alternative in the same module before finalizing defaults.
Can I run JavaScript Machine Learning API Reference in both browser and Node.js with @kanaries/ml?
Yes. @kanaries/ml is designed for JavaScript and TypeScript runtimes across browser applications, server-side Node.js services, and edge-friendly workflows.
Build JavaScript Machine Learning with @kanaries/ml
Discover how to train and deploy machine learning models in JavaScript and TypeScript using @kanaries/ml, including installation, core features, tutorials, and API references.
Bayes
Learn how to use Bayes algorithms in @kanaries/ml for JavaScript and TypeScript machine learning projects.