How many products the graphs allow (small models)
Source:R/configuration.R
vp_count_graph_products.RdHow many products the graphs allow, by trying every selection of the variable
features. Only for small models (max_features, 20 by default). It shows how
much of the model the graphs capture: compare the last number with the number
of valid configurations of the model, when it is known.
Arguments
- model
A model, from
vp_generate()orvp_read(), in its complete or its minimal form.- max_features
The largest number of variable features to try (2^n selections).
- products
The number of valid products of the model, if you know it (from a model counter): then two more columns say how much of the model the graphs explain, on a scale of yes/no choices (bits).
Value
One row: selections (2^n), respect_requires, and_excludes,
and_atleastone (NA without or_graph = TRUE); with products, also
bits_model (how many of the n yes/no choices the model takes away: n -
log2(products)) and explained (the share of them that the graphs take
away).
Examples
band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_count_graph_products(band)
#> # A tibble: 1 × 4
#> selections respect_requires and_excludes and_atleastone
#> <dbl> <int> <int> <int>
#> 1 2048 34 12 10