charfun_generator(FUN, height = 1)
fuzzy_tuple(FUN = fuzzy_normal, n = 5, ...,
universe = NULL, names = NULL)
is.charfun_generator(x)fuzzy_normal(mean = NULL, sd = 1, log = FALSE, height = 1, chop = 0)
fuzzy_two_normals(mean = NULL, sd = c(1,1), log = c(FALSE, FALSE),
height = 1, chop = 0)
fuzzy_bell(center = NULL, cross = NULL, slope = 4, height = 1, chop = 0)
fuzzy_sigmoid(cross = NULL, slope = 0.5, height = 1, chop = 0)
fuzzy_trapezoid(corners = NULL, height = c(1,1),
return_base_corners = TRUE)
fuzzy_triangular(corners = NULL, height = 1,
return_base_corners = TRUE)
fuzzy_cone(center = NULL, radius = 2, height = 1,
return_base_corners = TRUE)
fuzzy_pi3(mid = NULL, min = NULL, max = NULL, height = 1,
return_base_corners = TRUE)
fuzzy_pi4(knots, height = 1, return_base_corners = TRUE)
fuzzy_normal_gset(mean = NULL, sd = 1, log = FALSE, height = 1,
chop = 0, universe = NULL)
fuzzy_two_normals_gset(mean = NULL, sd = c(1,1), log = c(FALSE, FALSE),
height = 1, chop = 0, universe = NULL)
fuzzy_bell_gset(center = NULL, cross = NULL, slope = 4, height = 1,
chop = 0, universe = NULL)
fuzzy_sigmoid_gset(cross = NULL, slope = 0.5, height = 1,
chop = 0, universe = NULL)
fuzzy_trapezoid_gset(corners = NULL, height = c(1,1), universe = NULL,
return_base_corners = TRUE)
fuzzy_triangular_gset(corners = NULL, height = 1, universe = NULL,
return_base_corners = TRUE)
fuzzy_cone_gset(center = NULL, radius = 2, height = 1, universe = NULL,
return_base_corners = TRUE)
fuzzy_pi3_gset(mid = NULL, min = NULL, max = NULL, height = 1,
universe = NULL, return_base_corners = TRUE)
fuzzy_pi4_gset(knots, height = 1,
universe = NULL, return_base_corners = TRUE)
center
to get the
base line corners of the cone..Machine$double.eps
) instead of 0.
Otherwise, if a set is created from the memberships,
the corner elements wouFUN
.charfun_generator
, a generating function
taking an argument list of parameters, and returning a membership
function, mapping elements to membership values (from of the unit
interval).
For fuzzy_tuple
, a tuple of n
fuzzy sets.
For is.charfun_generator
, a logical. For fuzzy_foo_gset
, a fuzzy set.
For the other functions, a membership function.
The core functions are function generators, taking parameters
and returning a corresponding fuzzy function (i.e., with values in the
unit interval). All of them are normalized, i.e., scaled to have a
maximum value of height
(default: 1):
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
charfun_generator
takes a vectorized function as argument,
returning a function normalized by height
.
The fuzzy_foo_gset
functions directly generate
generalized sets from fuzzy_foo
, using the values defined by
universe
, sets_options("universe")
, or seq(0, 20, by
= 0.1)
(in that order, whichever is not NULL
).
fuzzy_tuple
generates a sequence of n
sets based on any of the generating functions (except
fuzzy_trapezoid
and fuzzy_triangular
). The chosen
generating function FUN
is called with n
different
values chosen along the universe
passed to the
first argument, thus varying the position or the resulting graph.
set
, gset
, and tuple
for the
set types, and plot.gset
for the available plot functions.## creating a fuzzy normal function
N <- fuzzy_normal(mean = 0, sd = 1)
N(-3:3)
## create a fuzzy set with it
gset(charfun = N, universe = -3:3)
## same using wrapper
fuzzy_normal_gset(universe = -3:3)
## creating a user-defined fuzzy function
fuzzy_poisson <- charfun_generator(dpois)
gset(charfun = fuzzy_poisson(10), universe = seq(0, 20, 2))
## creating a series of fuzzy normal sets
fuzzy_tuple(fuzzy_normal, 5)
## creating a series of fuzzy cones with specific locations
fuzzy_tuple(fuzzy_cone, c(2,3,7))
Run the code above in your browser using DataLab