Skip to contents

Features grouped by their measures (the columns of vp_feature_table()): features in the same group play a similar role. Hierarchical clustering on the scaled measures.

Usage

vp_feature_groups(
  model,
  groups = 4,
  measures = c("required_by", "requires", "excludes", "level", "betweenness")
)

Arguments

model

A model, from vp_generate() or vp_read(), in its complete or its minimal form.

groups

How many groups.

measures

The columns of vp_feature_table() to group by.

Value

A tibble with feature and group.

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_feature_groups(band, groups = 3)
#> # A tibble: 11 × 2
#>    feature            group
#>    <chr>              <int>
#>  1 Screen                 1
#>  2 TouchScreen            2
#>  3 OLED                   1
#>  4 CapacityButton         1
#>  5 ContactlessPayment     2
#>  6 MovementFilter         2
#>  7 HeartRateSensor        1
#>  8 BLEv40                 2
#>  9 BLEv42                 2
#> 10 BT40                   3
#> 11 NFC                    2