Home▸Machine Learning & Neural Networks▸3D Random Forest Visualization

3D Random Forest Visualization

Orbit a real Three.js forest of decision-stump trees — the same threshold-split predict logic and majority-vote rule as the 2D Random Forest Visualization, now cast across a genuine 3D scene instead of a flat grid of canvases.

Machine Learning & Neural Networks3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
3d-random-forest-visualization ↗ Open standalone

This is the 3D companion to the Random Forest Visualization: the exact same ensemble-voting model — numTrees independent decision stumps, each with a random feature choice and threshold, predicting class 0 or 1 from value < threshold then a secondary leftThreshold/rightThreshold split — now stands as a genuine, freely-orbitable Three.js forest instead of a flat grid of 2D canvases. Tune Feature 1 and Feature 2 and press Predict: each tree lights up the leaf matching its own vote, fires a glowing particle across the scene, and the two class pillars at the center of the forest grow in real time to the exact vote count — the same majority-rule tally the 2D bar chart reports, just rendered as height in 3D space instead of a Chart.js bar.

⚙ Under the hood

Each of the numTrees trees runs the identical predict(features) logic as the 2D original — a random feature/threshold split followed by a second threshold split into class 0 or 1 — ported 1:1 into a Three.js scene: root, child and leaf spheres connected by cylindrical branches, arranged in a ring, with vote particles and height-scaled class pillars replacing the flat bar chart.

Random ForestEnsemble LearningDecision TreesThree.js

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)