fzn | R Documentation |
This function creates an object of class fzn
, which is a list
containing the alpha-cuts of the membership function, the lower and upper limits of the
corresponding alpha-cuts, and the interpolation method. This structure is not the
fuzzy number itself because it does not contain the full membership function, but the values
of some alpha-cuts, i.e. the values that the fuzzy number can take at some alpha-levels.
The reason behind this methodology is that, in most applications, we are only interested
in certain alpha-cuts and therefore it is not necessary to work with the full membership
function.
fzn(alpha,
l,
u,
interp = c("approx", "spline", "step", "step2"))
alpha |
A vector with the possibility values, a.k.a. alpha-cuts. It must start at 0 and end at 1, in ascending order. Alternatively, it can be a matrix of 3 rows in which the first row is the alpha-cuts vector, the second row is the corresponding lower limits vector and the third row is the corresponding upper limits vector. |
l |
A vector of the same length as |
u |
A vector of the same length as |
interp |
A string with the function or method used to interpolate new alpha-cuts. Choices
are " |
An object of class fzn
.
x <- fzn(alpha = c(0, 0.1, 0.5, 0.8, 1),
l = c(1, 3, 3, 4.5, 5),
u = c(12, 10, 9, 6.5, 6)) # interp = "approx" by default
par(mfrow = c(2, 2))
plotfzn(x, main = "interp = \"approx\" (linear)")
x$interp <- "spline"
plotfzn(x, main = "interp = \"spline\"")
x$interp <- "step"
plotfzn(x, main = "interp = \"step\" (wide)", plot_points = TRUE)
x$interp <- "step2"
plotfzn(x, main = "interp = \"step2\" (narrow)", plot_points = TRUE)
x$interp <- "spline"
par(mfrow = c(1, 2))
plotfzn(x, main = "interp = \"spline\"")
# Adding new alpha-cuts using spline interpolation (since x$interp == "spline")
x <- fzn(alphacut(x, alpha = seq(from = 0, to = 1, by = 0.1)))
plotfzn(x, main = "interp = \"approx\", with new alphacuts")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.