Linear
Learn how to use Linear algorithms in @kanaries/ml for JavaScript and TypeScript machine learning projects.
How to use the Linear module in real projects
The Linear module provides fast and interpretable supervised learning algorithms for numeric tabular data in browser and Node.js runtimes.
Selection checklist
- Use LinearRegression for continuous targets and baseline forecasting-style tasks.
- Use LogisticRegression for binary outcomes and probability-oriented decision thresholds.
- Normalize numeric inputs and monitor train/validation performance before production rollout.
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
linear regression javascriptlogistic regression typescriptsupervised ml in browser
Explore algorithms in this module
FAQ
What problem does Linear solve in JavaScript machine learning projects?
Linear helps teams implement production-ready ML workflows in browser and Node.js environments with a familiar scikit-learn-style API.
When should I choose Linear instead of other Linear algorithms?
Use Linear 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 Linear 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.