genmf {FuzzyR} | R Documentation |
Fuzzy membership function generator
Description
To generate the corresponding membership function f(x), also called fuzzy set, according to type and parameters
Usage
genmf(mf.type, mf.params)
Arguments
mf.type |
The membership function type |
mf.params |
The parameters for a membership function |
Details
Built-in membership function types are: 'gbellmf', 'it2gbellmf', 'singletonmf', 'linearmf', 'gaussmf', 'trapmf', 'trimf'.
mf.params for
'gbellmf' is c(
a, b, c
), wherea
denotes the width,b
is usually positive and c locates the center of the curve.
'it2gbellmf' is c(
a.lower, a.upper, b, c
), wherea.upper > a.lower
whenb > 0
anda.upper < a.lower
whenb < 0
'singletonmf' is c(
c
), wherec
is the location where the membership grade is 1.
'linearmf' is c(
...
), which are the coefficients of the linear membership function.
'gaussmf' is c(
sig, c
), which are the parameters for exp(-(x - c)^2/(2 * sig^2)).
'trapmf' is c(
a, b, c, d
), wherea
andd
locate the "feet" of the trapezoid andb
andc
locate the "shoulders".
'trimf' is c(
a, b, c
), wherea
andc
locate the "feet" of the triangle andb
locates the peak.
Note that users are able to define their own membership functions.
Value
The desired type of membership function f(x), where x is a generic element of U, which is the universe of discourse for a fuzzy set
Author(s)
Chao Chen
Examples
mf <- genmf('gbellmf', c(1,2,3))
evalmf(1:10, mf)