Assuming that the fuzzy values are probabilities, calculates the probability of being of different sizes for a given set.
Methods (by class)
set_size(TidySet)
: Calculates the size of a set usinglength_set()
See also
cardinality
Other sizes:
element_size()
Other methods:
TidySet-class
,
activate()
,
add_column()
,
add_relation()
,
arrange.TidySet()
,
cartesian()
,
complement_element()
,
complement_set()
,
complement()
,
element_size()
,
elements()
,
filter.TidySet()
,
group_by.TidySet()
,
group()
,
incidence()
,
intersection()
,
is.fuzzy()
,
is_nested()
,
move_to()
,
mutate.TidySet()
,
nElements()
,
nRelations()
,
nSets()
,
name_elements<-()
,
name_sets<-()
,
name_sets()
,
power_set()
,
pull.TidySet()
,
relations()
,
remove_column()
,
remove_element()
,
remove_relation()
,
remove_set()
,
rename_elements()
,
rename_set()
,
select.TidySet()
,
sets()
,
subtract()
,
union()
Examples
relations <- data.frame(
sets = c(rep("A", 5), "B", "C"),
elements = c(letters[seq_len(6)], letters[6]),
fuzzy = runif(7)
)
a <- tidySet(relations)
set_size(a)
#> sets size probability
#> 1 A 0 0.0003426333
#> 2 A 1 0.0209556642
#> 3 A 2 0.2353804439
#> 4 A 3 0.5097888990
#> 5 A 4 0.2297076037
#> 6 A 5 0.0038247559
#> 7 B 0 0.3220219053
#> 8 B 1 0.6779780947
#> 9 C 0 0.3348475387
#> 10 C 1 0.6651524613