# How to visualise the structure of the decision tree built by MLJ?

**URL:** <https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946>\
**Category:** Machine Learning\
**Created:** [November 11, 2019, 9:53am UTC](https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946 "2019-11-11T09:53:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [November 16, 2019, 4:23pm UTC](https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946/2 "2019-11-16T16:23:39Z")

</div>

In the doc I believe it’s explained that the machine is just a wrapper for the model (a container with just the hyperparameters) and essentially the “fitresults” (whatever is learned during the fitting process that needs to be passed on to the predict or transform method).

So in this case if you want to recuperate the actual _trained tree_, please have a look at `tree_machine.fitresult`; IIRC the first element of the tuple is the tree that you want. This is also returned maybe more transparently by `fitted_params(tree_machine)` as a namedtuple.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-visualise-the-structure-of-the-decision-tree-built-by-mlj/30946)._
