Assuming that the fuzzy values are probabilities, calculates the probability of being of different sizes for a given set.

element_size(object, elements = NULL)

# S4 method for TidySet
element_size(object, elements = NULL)

Arguments

object

A TidySet object.

elements

The element from which the length is calculated.

Value

A list with the size of the elements or the probability of having that size.

Methods (by class)

  • TidySet: Calculates the number of sets an element appears with length_set()

See also

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) element_size(a)
#> elements size probability #> 1 a 0 0.62848882 #> 2 a 1 0.37151118 #> 3 b 0 0.97193903 #> 4 b 1 0.02806097 #> 5 c 0 0.53401281 #> 6 c 1 0.46598719 #> 7 d 0 0.60996861 #> 8 d 1 0.39003139 #> 9 e 0 0.97993478 #> 10 e 1 0.02006522 #> 11 f 0 0.27418710 #> 12 f 1 0.51474204 #> 13 f 2 0.21107086