viviNetwork
Create a Network plot displaying variable importance and variable interaction.
viviNetwork( mat, intThreshold = NULL, intLims = NULL, impLims = NULL, intPal = rev(colorspace::sequential_hcl(palette = "Blues 3", n = 100)), impPal = rev(colorspace::sequential_hcl(palette = "Reds 3", n = 100)), removeNode = FALSE, layout = igraph::layout_in_circle, cluster = NULL, nudge_x = 0.05, nudge_y = 0.03 )
mat |
A matrix, such as that returned by vivi, of values to be plotted. |
intThreshold |
Remove edges with weight below this value if provided. |
intLims |
Specifies the fit range for the color map for interaction strength. |
impLims |
Specifies the fit range for the color map for importance. |
intPal |
A vector of colours to show interactions, for use with scale_fill_gradientn. |
impPal |
A vector of colours to show importance, for use with scale_fill_gradientn. |
removeNode |
If TRUE, then removes nodes with no connecting edges when thresholding interaction values. |
layout |
igraph layout function or a numeric matrix with two columns, one row per node. Defaults to igraph::layout_as_circle |
cluster |
Either a vector of cluster memberships for nodes or an igraph clustering function. |
nudge_x |
Nudge (centered) labels by this amount, outward horizontally |
nudge_y |
Nudge (centered) labels by this amount, outward vertically |
A plot displaying interaction strength between variables on the edges and variable importance on the nodes.
library(ranger) aq <- na.omit(airquality) rF <- ranger(Ozone ~ ., data = aq, importance = "permutation") myMat <- vivi(fit = rF, data = aq, response = "Ozone") viviNetwork(myMat)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.