ExtraTreesRegressor
Train extremely randomized regression trees in JavaScript or TypeScript with ExtraTreesRegressor from @kanaries/ml for browser and Node.js.
View as MarkdownAlgorithm overview
ExtraTreesRegressor averages many highly randomized regression trees. Random thresholds diversify members, and averaging turns their piecewise predictions into a lower-variance ensemble.
JavaScript implementation
Ensemble.ExtraTreesRegressor uses the shared forest runtime in @kanaries/ml, works in browsers and Node.js, supports seeded training, and exposes averaged feature importances.
Interactive Extra Trees regression playground
Adjust the number of randomized trees, reroll the sample, or add a point. The displayed prediction is fitted live with Ensemble.ExtraTreesRegressor in your browser.
ExtraTreesRegressor playground
Adjust the data and model, then click the chart to add a training observation.
Quick start example
import { Ensemble } from '@kanaries/ml';
const model = new Ensemble.ExtraTreesRegressor({ nEstimators: 100, max_features: 'all', randomState: 42 });
model.fit([[0], [1], [2], [3], [4]], [0, 1, 4, 9, 16]);
console.log(model.predict([[2.5]]), model.featureImportances);Detailed API reference
Options include nEstimators?, bootstrap?, randomState?, max_features?, and ExtraTreeRegressor depth/split options. Methods are fit(X, y) and predict(X); featureImportances is available after fitting.
ExtraTreesClassifier
Train extremely randomized classification trees in JavaScript or TypeScript with ExtraTreesClassifier from @kanaries/ml for browser and Node.js.
AdaBoost Classifier
Learn what AdaBoost Classifier does, when to use it, and how to run AdaBoostClassifier in JavaScript or TypeScript with @kanaries/ml for browser and Node.js applications.