High level code structure for main functions in the package.
Convert h2o tree structures to data.frames.
- h2o_tree_convertR
- h2o.saveMojo
- trees_to_gvs
- loop through all trees {call_PrintMojo}
- lapply gv_to_table to trees_to_gvs output
Create mapping between output of h2o.predict_lead_node_assignment (i.e. terminal node paths represented as L(eft) or R(ight) decisions at each node) and terminal node path represented as variable decisions (i.e. A > x & B in (y, z) etc).
- map_h2o_encoding
- extract_split_rules with terminal_node_paths = TRUE
- extract_split_rules with terminal_node_paths = FALSE
Get split conditions for terminal nodes for all trees in a h2o model.
- extract_split_rules
- lapply get_split_expressions to h2o_tree_convertR output (function input)
- lapply terminal_node_exprs to get_split_expressions output
Encode input data as terminal nodes from a h2o tree model.
- encode_terminal_nodes
- mapply encode_terminal_nodes_df to h2o_tree_convertR and extract_split_rules outputs (function inputs)
- evaluate terminal node conditions on input data
- mapply encode_terminal_nodes_df to h2o_tree_convertR and extract_split_rules outputs (function inputs)