The igraph object of one graph, for those who want to use igraph directly.
The vertices are the variable features, in the same order in the three
graphs, and each has the attribute name.
Usage
vp_igraph(model, graph = c("requires", "excludes", "atleastone"))Arguments
- model
A model, from
vp_generate()orvp_read(), in its complete or its minimal form.- graph
Which graph:
"requires","excludes"or"atleastone"(the last one needsor_graph = TRUEinvp_generate()).
Examples
band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
g <- vp_igraph(band, "excludes")
igraph::degree(g)
#> Screen TouchScreen OLED CapacityButton
#> 1 3 1 1
#> ContactlessPayment MovementFilter HeartRateSensor BLEv40
#> 3 6 1 5
#> BLEv42 BT40 NFC
#> 3 9 3