The FuzzyHits class extends the Hits class to represent hits that are associated with different grades of membership in the interval [0,1].

FuzzyHits(from = integer(0), to = integer(0),
  membership = numeric(0), nLnode = 0L, nRnode = 0L, ...)

Arguments

from, to

Two integer vectors of the same length. The values in from must be >= 1 and <= nLnode. The values in to must be >= 1 and <= nRnode.

membership

Numeric. Vector of numeric membership function in the range [0,1]

nLnode, nRnode

Number of left and right nodes.

...

Arguments metadata columns to set on the FuzzyHits object. All the metadata columns must be vector-like objects of the same length as from, to, and membership.

Value

A FuzzyHits object.

Details

This class does not define any additional slot to the Hits class. However, this class defines additional validity checks to ensure that every relation stored in a FuzzyHits are associated with a numeric membership funtion in the interval [0,1].

See also

Hits, FuzzySets.

Examples

# Constructor ---- from <- c(5, 2, 3, 3, 3, 2) to <- c(11, 15, 5, 4, 5, 11) membership <- c(0, 0.1, 0.2, 0.3, 0.6, 0.8) fh <- FuzzyHits(from, to, membership, 7, 15) fh
#> FuzzyHits object with 6 hits and 1 metadata column: #> from to | membership #> <integer> <integer> | <numeric> #> [1] 5 11 | 0.0 #> [2] 2 15 | 0.1 #> [3] 3 5 | 0.2 #> [4] 3 4 | 0.3 #> [5] 3 5 | 0.6 #> [6] 2 11 | 0.8 #> ------- #> nLnode: 7 / nRnode: 15