Membership functions
DifferenceSigmoid membership function
FuzzyLogic.DifferenceSigmoidMF — Type
struct DifferenceSigmoidMF{Ta1<:Real, Tc1<:Real, Ta2<:Real, Tc2<:Real} <: FuzzyLogic.AbstractMembershipFunctionDifference of two sigmoids. See also SigmoidMF.
Fields
a1::Real: slope of the first sigmoid.c1::Real: center of the first sigmoid.a2::Real: slope of the second sigmoid.c2::Real: center of the second sigmoid.
Example
mf = DifferenceSigmoidMF(5, 2, 5, 7)Gaussian membership function
FuzzyLogic.GaussianMF — Type
struct GaussianMF{Tm<:Real, Ts<:Real} <: FuzzyLogic.AbstractMembershipFunctionGaussian membership function $e^{-\frac{(x-μ)²}{2σ²}}$.
Fields
mu::Real: mean $μ$.sig::Real: standard deviation $σ$.
Example
mf = GaussianMF(5.0, 1.5)GeneralizedBell membership function
FuzzyLogic.GeneralizedBellMF — Type
struct GeneralizedBellMF{Ta<:Real, Tb<:Real, Tc<:Real} <: FuzzyLogic.AbstractMembershipFunctionGeneralized Bell membership function $\frac{1}{1+\vert\frac{x-c}{a}\vert^{2b}}$.
Fields
a::Real: Width of the curve, the bigger the wider.b::Real: Slope of the curve, the bigger the steeper.c::Real: Center of the curve.
Example
mf = GeneralizedBellMF(2, 4, 5)Linear membership function
FuzzyLogic.LinearMF — Type
struct LinearMF{Ta<:Real, Tb<:Real} <: FuzzyLogic.AbstractMembershipFunctionLinear membership function. If $a < b$, it is increasing (S-shaped), otherwise it is decreasing (Z-shaped).
Fields
a::Real: foot.b::Real: shoulder.
Example
mf = LinearMF(2, 8)PiShape membership function
FuzzyLogic.PiShapeMF — Type
struct PiShapeMF{Ta<:Real, Tb<:Real, Tc<:Real, Td<:Real} <: FuzzyLogic.AbstractMembershipFunctionΠ-shaped membership function.
Fields
a::Real: left foot.b::Real: left shoulder.c::Real: right shoulder.d::Real: right foot.
Example
mf = PiShapeMF(1, 4, 5, 10)PiecewiseLinear membership function
FuzzyLogic.PiecewiseLinearMF — Type
struct PiecewiseLinearMF{T<:Real, S<:Real} <: FuzzyLogic.AbstractMembershipFunctionPiecewise linear membership function.
Fields
points::Array{Tuple{T, S}, 1} where {T<:Real, S<:Real}
Notes
If the input is between two points, its membership degree is computed by linear interpolation. If the input is before the first point, it has the same membership degree of the first point. If the input is after the last point, it has the same membership degree of the first point.
Example
mf = PiecewiseLinearMF([(1, 0), (2, 1), (3, 0), (4, 0.5), (5, 0), (6, 1)])ProductSigmoid membership function
FuzzyLogic.ProductSigmoidMF — Type
struct ProductSigmoidMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunctionProduct of two sigmoids. See also SigmoidMF.
Fields
a1::Real: slope of the first sigmoid.c1::Real: center of the first sigmoid.a2::Real: slope of the second sigmoid.c2::Real: center of the second sigmoid.
Example
mf = ProductSigmoidMF(2, 3, -5, 8)SShape membership function
FuzzyLogic.SShapeMF — Type
struct SShapeMF{Ta<:Real, Tb<:Real} <: FuzzyLogic.AbstractMembershipFunctionS-shaped membership function.
Fields
a::Real: foot.b::Real: shoulder.
Example
mf = SShapeMF(1, 8)SemiElliptic membership function
FuzzyLogic.SemiEllipticMF — Type
struct SemiEllipticMF{Tcd<:Real, Trd<:Real} <: FuzzyLogic.AbstractMembershipFunctionSemi-elliptic membership function.
Fields
cd::Real: center.rd::Real: semi-axis.
Example
mf = SemiEllipticMF(5.0, 4.0)Sigmoid membership function
FuzzyLogic.SigmoidMF — Type
struct SigmoidMF{Ta<:Real, Tc<:Real} <: FuzzyLogic.AbstractMembershipFunctionSigmoid membership function $\frac{1}{1+e^{-a(x-c)}}$.
Fields
a::Real: parameter controlling the slope of the curve.c::Real: center of the slope.
Example
mf = SigmoidMF(2, 5)Singleton membership function
FuzzyLogic.SingletonMF — Type
struct SingletonMF{T<:Real} <: FuzzyLogic.AbstractMembershipFunctionSingleton membership function. Equal to one at a single point and zero elsewhere.
Fields
c::Real: Point at which the membership function has value 1.
Example
mf = SingletonMF(4)Trapezoidal membership function
FuzzyLogic.TrapezoidalMF — Type
struct TrapezoidalMF{Ta<:Real, Tb<:Real, Tc<:Real, Td<:Real} <: FuzzyLogic.AbstractMembershipFunctionTrapezoidal membership function.
Fields
a::Real: left foot.b::Real: left shoulder.c::Real: right shoulder.d::Real: right foot.
Example
mf = TrapezoidalMF(1, 3, 7, 9)Triangular membership function
FuzzyLogic.TriangularMF — Type
struct TriangularMF{Ta<:Real, Tb<:Real, Tc<:Real} <: FuzzyLogic.AbstractMembershipFunctionTriangular membership function.
Fields
a::Real: left foot.b::Real: peak.c::Real: right foot.
Example
mf = TriangularMF(3, 5, 7)Type2 membership function
FuzzyLogic.Type2MF — Type
struct Type2MF{MF1<:FuzzyLogic.AbstractMembershipFunction, MF2<:FuzzyLogic.AbstractMembershipFunction} <: FuzzyLogic.AbstractMembershipFunctionA type-2 membership function.
lo::FuzzyLogic.AbstractMembershipFunction: lower membership function.hi::FuzzyLogic.AbstractMembershipFunction: upper membership function.
Example
mf = 0.7 * TriangularMF(3, 5, 7) .. TriangularMF(1, 5, 9)Weighted membership function
FuzzyLogic.WeightedMF — Type
struct WeightedMF{MF<:FuzzyLogic.AbstractMembershipFunction, T<:Real} <: FuzzyLogic.AbstractMembershipFunctionA membership function scaled by a parameter $0 ≤ w ≤ 1$.
mf::FuzzyLogic.AbstractMembershipFunction: membership function.w::Real: scaling factor.
Example
mf = 0.5 * TriangularMF(1, 2, 3)ZShape membership function
FuzzyLogic.ZShapeMF — Type
struct ZShapeMF{Ta<:Real, Tb<:Real} <: FuzzyLogic.AbstractMembershipFunctionZ-shaped membership function.
Fields
a::Real: shoulder.b::Real: foot.
Example
mf = ZShapeMF(3, 7)