ExtraTreeRegressor
API and practical guide for ExtraTreeRegressor in @kanaries/ml, including when to use it in JavaScript and TypeScript ML workflows.
Tree.ExtraTreeRegressor
interface ExtraTreeRegressorProps {
max_depth?: number;
min_samples_split?: number;
splitter?: 'random';
max_features?: number | 'sqrt' | 'log2';
}
constructor(props: ExtraTreeRegressorProps = {})Example
const extra = new ExtraTreeRegressor();
extra.fit(X, Y);
const preds = extra.predict(T);Practical guide: ExtraTreeRegressor in JavaScript and TypeScript
ExtraTreeRegressor uses randomized splits for regression to reduce variance and capture non-linear structure efficiently.
When to use ExtraTreeRegressor
- 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.
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
- Prefer feature scaling for distance-based and gradient-based algorithms to improve stability.
- In browser apps, run heavy training in Web Workers to keep UI interactions smooth.
- Keep a simple baseline from the same module as a fallback model for comparison.
Search intents this page targets
ExtraTreeRegressor JavaScriptExtraTreeRegressor TypeScriptExtraTreeRegressor browser machine learning@kanaries/ml ExtraTreeRegressor
FAQ
What problem does ExtraTreeRegressor solve in JavaScript machine learning projects?
ExtraTreeRegressor helps teams implement production-ready ML workflows in browser and Node.js environments with a familiar scikit-learn-style API.
When should I choose ExtraTreeRegressor instead of other Tree algorithms?
Use ExtraTreeRegressor 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 ExtraTreeRegressor 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.