Utils
Utility functions for the ml library
How to use the Utils module in real projects
The Utils module includes workflow helpers that make JavaScript ML pipelines easier to train, evaluate, and ship.
Selection checklist
- Use asyncMode for non-blocking training or inference in UI-heavy browser applications.
- Combine utilities with model modules to build consistent preprocessing and evaluation flows.
- Standardize split logic and metric checks to keep experiments reproducible.
Common implementation workflow
- Start from a simple baseline in this module and evaluate on a holdout split.
- Compare at least one alternative algorithm from this module before locking production defaults.
- Pair model quality metrics with runtime constraints (latency, memory, bundle size).
Common search intents
ml utility functions javascriptasync machine learning browsertypescript model selection helpers
Explore algorithms in this module
FAQ
What problem does Utils solve in JavaScript machine learning projects?
Utils helps teams implement production-ready ML workflows in browser and Node.js environments with a familiar scikit-learn-style API.
When should I choose Utils instead of other Utils algorithms?
Use Utils 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 Utils 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.