thesps / conifer

Fast inference of Boosted Decision Trees in FPGAs
Apache License 2.0
42 stars 22 forks source link

Tree visualisation #48

Closed thesps closed 11 months ago

thesps commented 11 months 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 11 months ago

Tests pass ✅