Interactive D3 view of sklearn decision tree
This interactive visualization displays the decision rules of a scikit-learn decision tree as a collapsible Reingold-Tilford tree. Users click nodes to expand or collapse branches, revealing classification outcomes for a dataset with products like bread and cognac. Built with D3 v3, it uses `d3.layout.tree` for layout, `d3.svg.diagonal` for curved links, and `d3.json` to load the tree structure. Node positions transition smoothly via `node.transition().duration(750)`, with collapsed children stored in `_children`. The SVG rendering uses white and light-steelblue circles to indicate leaf versus internal nodes.
AI-generated descriptionThis 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>