Extra Tree Regressor
Learn what Extra Tree Regressor does, when to use it, and how to run ExtraTreeRegressor in JavaScript or TypeScript with @kanaries/ml for browser and Node.js applications.
View as MarkdownAlgorithm overview
ExtraTreeRegressor uses randomized splits for regression to reduce variance and capture non-linear structure efficiently.
This algorithm is especially useful when:
- DecisionTreeRegressor is too sensitive to small data perturbations.
- You need robust tree-style regression with limited tuning overhead.
- Non-linear relationships dominate your numeric prediction task.
JavaScript implementation
@kanaries/ml provides Extra Tree regression in JavaScript for non-linear tabular prediction with randomized splitting behavior. This can be useful when you want a lightweight tree regressor that differs from a standard decision tree in how it explores split candidates.
For TypeScript-based experimentation, it is a convenient way to compare deterministic and randomized tree regression strategies without switching runtimes.
Interactive Extra Tree playground
Tune the depth and minimum split size, add your own observations, and reroll the randomized thresholds. The chart and tree diagram are trained live with Tree.ExtraTreeRegressor, so every step in the blue prediction line comes from an actual leaf.
Learn ExtraTreeRegressor by changing it
Explore how randomized splits turn noisy observations into a piecewise prediction. Click the plot to add your own observation and refit instantly.
Tree.ExtraTreeRegressorQuick start
ExtraTreeRegressor in Python vs JavaScript / TypeScript
If you searched for "ExtraTreeRegressor in JavaScript" or "ExtraTreeRegressor in TypeScript", this section maps the familiar scikit-learn call to the equivalent @kanaries/ml usage for browser and Node.js runtimes.
from sklearn.tree import ExtraTreeRegressor
X = [[0], [1], [2], [3]]
y = [1.0, 2.0, 3.1, 4.1]
reg = ExtraTreeRegressor(max_depth=3, random_state=0)
reg.fit(X, y)
pred = reg.predict([[1.5], [2.5]])import { Tree } from '@kanaries/ml';
const X = [[0], [1], [2], [3]];
const y = [1.0, 2.0, 3.1, 4.1];
const reg = new Tree.ExtraTreeRegressor({ max_depth: 3 });
reg.fit(X, y);
const pred = reg.predict([[1.5], [2.5]]);Quick JavaScript example
import { Tree } from '@kanaries/ml';
const X = [[0], [1], [2], [3]];
const y = [1.0, 2.0, 3.1, 4.1];
const reg = new Tree.ExtraTreeRegressor({ max_depth: 3 });
reg.fit(X, y);
const pred = reg.predict([[1.5], [2.5]]);
console.log(pred);Detailed API reference
interface ExtraTreeRegressorProps {
max_depth?: number;
min_samples_split?: number;
splitter?: 'random';
max_features?: number | 'sqrt' | 'log2';
}
constructor(props: ExtraTreeRegressorProps = {})Implementation workflow
- Fit with baseline constraints and inspect holdout error metrics.
- Benchmark against linear and decision tree baselines.
- Tune depth/min-sample controls for stable generalization.
JavaScript deployment notes
- Use Extra Tree regression when you want a randomized tree baseline for structured regression tasks.
- Compare it against the standard decision tree regressor to understand the stability-versus-variance tradeoff.
- It is particularly useful as a stepping stone toward ensemble-style tree modeling.
Extra Tree Classifier
Learn what Extra Tree Classifier does, when to use it, and how to run ExtraTreeClassifier in JavaScript or TypeScript with @kanaries/ml for browser and Node.js applications.
Ensemble Learning
Explore ensemble learning algorithms in JavaScript and TypeScript with @kanaries/ml, including Isolation Forest, AdaBoost, random forests, and bagging models.