Robustness: remove the most required features one at a time and see how much
of the skeleton survives. With strategy = "random" the features are removed
at random instead, which gives the baseline.
Usage
vp_robustness(model, steps = 5, strategy = c("hubs", "random"), seed = 1)Arguments
- model
A model, from
vp_generate()orvp_read(), in its complete or its minimal form.- steps
How many features to remove.
- strategy
"hubs"removes the most required features first;"random"removes them at random (the baseline).- seed
The seed of the random numbers, so that the result can be repeated. The random state of the session is left as it was.
Value
A tibble with removed (how many), feature (the one removed at
that step), links_left (arrows of the skeleton among the remaining
features) and largest_piece (features in the largest connected piece).
Examples
band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_robustness(band, steps = 3)
#> # A tibble: 4 × 4
#> removed feature links_left largest_piece
#> <int> <chr> <dbl> <dbl>
#> 1 0 NA 6 7
#> 2 1 Screen 4 4
#> 3 2 HeartRateSensor 3 3
#> 4 3 BLEv42 2 2