| 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), whereadenotes the width,bis usually positive and c locates the center of the curve.
'it2gbellmf' is c(
a.lower, a.upper, b, c), wherea.upper > a.lowerwhenb > 0anda.upper < a.lowerwhenb < 0
'singletonmf' is c(
c), wherecis 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), whereaanddlocate the "feet" of the trapezoid andbandclocate the "shoulders".
'trimf' is c(
a, b, c), whereaandclocate the "feet" of the triangle andblocates 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)