@kanaries/ml

Ensemble Algorithms in @kanaries/ml

Detailed API reference for Isolation Forest and AdaBoost ensemble learning algorithms in JavaScript and TypeScript.

Ensemble algorithms

Ensemble methods in @kanaries/ml combine multiple weak learners to produce stronger, more resilient models for both regression and classification tasks. Use the links below to explore parameter definitions, method signatures, and implementation details for each estimator.

Isolation Forest for anomaly detection

Ensemble.IsolationForest isolates anomalies by randomly partitioning the feature space. Shorter average path lengths indicate outliers, making this algorithm well-suited for fraud detection, observability metrics, and IoT monitoring in JavaScript environments.

Highlights

  • Works with high-dimensional tabular data without heavy preprocessing.
  • Offers configurable contamination rates to tune sensitivity.
  • Runs in browsers or Node.js with minimal dependencies.

Read the full Isolation Forest API reference for constructor arguments, fit/predict usage, and scoring helpers.

AdaBoostRegressor for gradient boosting

Ensemble.AdaBoostRegressor sequentially trains weak regressors and boosts their contributions to reduce error. It is ideal for modeling continuous targets where interpretability and responsiveness matter.

Use cases

  • Forecasting metrics for product analytics dashboards.
  • Enhancing baseline linear models with non-linear corrections.
  • Building lightweight regressors that deploy quickly in serverless functions.

Review the AdaBoost regressor documentation for hyperparameters and example workflows.

AdaBoostClassifier for robust classification

Ensemble.AdaBoostClassifier focuses on misclassified samples in each iteration to improve predictive accuracy. Apply it to click-through rate prediction, churn modeling, or any binary/multi-class problem where you need fast inference in JavaScript.

Key capabilities

  • Adjustable learning rates to balance speed and generalization.
  • Support for sample weighting and class imbalance handling.
  • Compatible with the preprocessing tools found in the utils module.

Explore the AdaBoost classifier guide for parameter tables, training instructions, and evaluation tips.

How to use the Ensemble module in real projects

The Ensemble module improves robustness by combining multiple weak learners, helping JavaScript models generalize better on noisy datasets.

Selection checklist

  1. Use IsolationForest for unsupervised anomaly detection on tabular telemetry or transaction streams.
  2. Use AdaBoostClassifier for difficult classification boundaries with moderate feature counts.
  3. Use AdaBoostRegressor to improve non-linear regression quality over a single weak estimator.

Common implementation workflow

  1. Start from a simple baseline in this module and evaluate on a holdout split.
  2. Compare at least one alternative algorithm from this module before locking production defaults.
  3. Pair model quality metrics with runtime constraints (latency, memory, bundle size).

Common search intents

  • isolation forest javascript
  • adaboost classifier typescript
  • ensemble learning nodejs

Explore algorithms in this module

FAQ

What problem does Ensemble Algorithms in @kanaries/ml solve in JavaScript machine learning projects?

Ensemble Algorithms in @kanaries/ml helps teams implement production-ready ML workflows in browser and Node.js environments with a familiar scikit-learn-style API.

When should I choose Ensemble Algorithms in @kanaries/ml instead of other Ensemble algorithms?

Use Ensemble Algorithms in @kanaries/ml 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 Ensemble Algorithms in @kanaries/ml 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.