Skip to contents

Fuzzy difference operations are set operations that generalize Boolean difference operations. This family of functions implements some operators that help us to define different fuzzy difference operations. These operators receive two numerical values in [0, 1] as input and calculates another numerical value in [0, 1] as output.

Usage

f_diff(x, y)

f_bound_diff(x, y)

f_symm_diff(x, y)

f_abs_diff(x, y)

Arguments

x

A numerical vector whose values are in [0, 1].

y

A numerical vector whose values are in [0, 1].

Value

A numerical vector.

Details

These functions calculate the resulting membership degree of a fuzzy difference operator applied on two numerical values in the interval [0, 1]. The following fuzzy difference operators are available:

  • f_diff(): The standard fuzzy set difference operator defined as the intersection of x and the complement of y, that is, min(x, 1 - y).

  • f_bound_diff(): The fuzzy bounded difference operator defined as x minus y with upper bound equal to 0, that is, max(0, x - y).

  • f_symm_diff(): The fuzzy symmetric difference operator defined as the union of the difference of x and y and the difference of y and x, that is, max(f_diff(x, y), f_diff(y, x)).

  • f_abs_diff(): The fuzzy absolute difference operator defined as the absolute difference of x and y, that is, abs(x - y).

The name of these functions can be used in the parameter dtype of the spa_difference() function.

Examples

x <- c(0.1, 0.3, 0.6, 0.8)
y <- c(0.9, 0.7, 0.4, 0.2)

f_diff(x, y)
#> [1] 0.1 0.3 0.6 0.8
f_bound_diff(x, y)
#> [1] 0.0 0.0 0.2 0.6
f_symm_diff(x, y)
#> [1] 0.9 0.7 0.6 0.8
f_abs_diff(x, y)
#> [1] 0.8 0.4 0.2 0.6