Skip to main content
100%

Interactive D3 view of sklearn decision tree

✓ Published0🌍 Public
MMNoichl
Last edited Aug 4, 2018
Created on Aug 4, 2018

This interactive visualization displays a decision tree trained on cocktail recipe data, showing the ingredient-based rules that classify drinks. Each node represents a threshold test on an ingredient quantity, with leaf nodes listing predicted cocktail categories. Users can click nodes to expand or collapse branches, revealing the tree’s hierarchical structure. The code uses D3.js v3 with its `d3.layout.tree` for the Reingold-Tilford layout and `d3.svg.diagonal` for curved links, rendering nodes as SVG circles and text with smooth animated transitions between states.

AI-generated description

This is Bostock's interactive Reingold-Tilford Tree with data representing the rules of a simple sklearn decision tree. Click on nodes to expand or collapse.

For more, see the complete write-up.

forked from <a href='http://bl.ocks.org/ajschumacher/'>ajschumacher</a>'s block: <a href='http://bl.ocks.org/ajschumacher/65eda1df2b0dd2cf616f'>Interactive D3 view of sklearn decision tree</a>

forked from <a href='http://bl.ocks.org/renecnielsen/'>renecnielsen</a>'s block: <a href='http://bl.ocks.org/renecnielsen/f11624fe14195cf8a1c5'>Interactive D3 view of sklearn decision tree</a>

mit Licensed

Similar vizzes