thesps / conifer

Fast inference of Boosted Decision Trees in FPGAs
Apache License 2.0
48 stars 27 forks source link

Tree visualisation #48

Closed thesps closed 1 year ago

thesps commented 1 year ago

Add Decision Tree and Model draw methods to visualise tree structure showing:

The plotting uses Graphviz and pydot for drawing, which are not added to the dependencies, but will not break import if not available, and print a helpful message if drawing is attempted without them.

Here's an example for one tree (e.g. conifer_model.trees[0][0].draw(filename='tree.png')): tree

and here's an example for a model (e.g. conifer_model.draw(filename='model.png')): model

thesps commented 1 year ago

Tests pass ✅