
Investigate First Order Interactions
Source:R/YARF_queries.R
first_order_interaction_investigator.RdThis function investigates all two-way interactions in the forest by measuring how many times splits of one variable is nested in splits of another variable.
Usage
first_order_interaction_investigator(
yarf_mod,
plot = TRUE,
only_non_self_interactions = FALSE,
num_var_plot = 50
)Arguments
- yarf_mod
The YARF model in which to query
- plot
This controls whether or not the function plots the interaction strengths. If so, it plots in order of strength from highest to lowest. Default is
TRUE.- only_non_self_interactions
Should we only show interactions between different variables? Default is
FALSEto show interactions of variables with themselves.- num_var_plot
How many first order interactions to plot? All would be p-choose-2 which can be large. The default is
50. UseInfto plot all p-choose-2.