Other things to know about MOJOs
You are now ready to deploy MOJOs, with or without required wrappers, as articulated in the previous section. Let's round up our knowledge of MOJOs by addressing the following secondary topics.
Inspecting MOJO decision logic
For tree-based models, you can use a utility built into h2o-genmodel.jar
to generate a graphical representation of the tree logic in the MOJO. Here is how.
Let's use the same MOJO we used in the previous coding example of building a wrapper class. On the command line where your h2o-genmodel.jar
is located, run the following:
java -cp h2o-genmodel.jar hex.genmodel.tools.PrintMojo \ -i "path/to/mojo" \ -o tree.png \ --format png \ --tree 0
This will create a .png
file that looks like this:
Note that if you omitted --tree 0
, you would have generated a folder holding a forest of all trees. We have specified to return...