Uses naive alternative methods to approximate triangular fuzzy numbers from real value number input data.
fuzzify(x, y = NULL, method = "mean", err = 0, dimnames = NULL, ...)A data.frame with columns representing the central value, left and right spread of
x and the values in y coerrced to a factor. Attempt is made to inherit
names from the input data. Methods
mean and zero will return symmetric TFNs, whereas methods median and
error can return non-symmetric TFNs depending on input data and the data or the
values in the err argument.
numeric vector.
vector that can be coerced to factor (optional).
character vector specifying the conversion method. See Details.
numeric vector. Error term for the error method.
list of length 2 giving names of the x and y
variables.
additional parameters passed to other functions.
Converts crisp numbers in x to a triangular fuzzy number (TFN). Optionally,
values in y can be used as grouping elements and are coerced to a factor.
Method mean calculates the central value of a TFN as the mean of x given
y, and the left and right spreads as standard deviations.
Method median gives the central values as a median and left and right spreads
are calculated as distance of the first and third quartile from the median.
Method zero inserts zeros to both spreads.
Method error uses a user-defined numeric value or vector for the spreads.
The length of the numeric vector in argument err must be in
(1, length(x), 2 * length(x)).
fuzzify(1:5)
fuzzify(1:6, c(1,1,1,2,2,2), method = "err", err = runif(6) * 1e-3)
Run the code above in your browser using DataLab