Defuzzifier
Bisector
¶
Bases: IntegralDefuzzifier
Integral defuzzifier that computes the bisector of a fuzzy set.
related
Functions¶
defuzzify
¶
Compute the bisector of a fuzzy set, that is, the x-coordinate such that the area to its left is approximately equal to the area to its right.
The defuzzification process integrates over the fuzzy set using the given range. The integration algorithm is the midpoint rectangle method (https://en.wikipedia.org/wiki/Rectangle_method).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
fuzzy set to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(x\)-coordinate of the bisector of the fuzzy set |
Centroid
¶
Bases: IntegralDefuzzifier
Integral defuzzifier that computes the centroid of a fuzzy set.
related
Functions¶
defuzzify
¶
Compute the centroid of a fuzzy set.
The defuzzification process integrates over the fuzzy set using the given range. The integration algorithm is the midpoint rectangle method (https://en.wikipedia.org/wiki/Rectangle_method).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
fuzzy set to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
\(x\)-coordinate of the centroid of the fuzzy set |
Defuzzifier
¶
Bases: ABC
Abstract class for defuzzifiers.
related
Functions¶
__repr__
¶
__repr__() -> str
Return the code to construct the defuzzifier in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the defuzzifier in Python. |
__str__
¶
__str__() -> str
Return the code to construct the defuzzifier in the FuzzyLite Language.
Returns:
Type | Description |
---|---|
str
|
code to construct the defuzzifier in the FuzzyLite Language. |
configure
¶
configure(parameters: str) -> None
Configure the defuzzifier with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters
|
str
|
space-separated parameter values |
required |
defuzzify
abstractmethod
¶
Defuzzify the term using the range [minimum,maximum]
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
term to defuzzify, typically an Aggregated term |
required |
minimum
|
float
|
minimum value of the range |
required |
maximum
|
float
|
maximum value of the range |
required |
Returns:
Type | Description |
---|---|
Scalar
|
defuzzified value of the term. |
IntegralDefuzzifier
¶
Bases: Defuzzifier
Abstract class for defuzzifiers that integrate over the fuzzy set.
related
Attributes¶
Functions¶
__init__
¶
__init__(resolution: int | None = None) -> None
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resolution
|
int | None
|
number of divisions to discretize the range and compute the area under the curve. |
None
|
__repr__
¶
__repr__() -> str
Return the code to construct the defuzzifier in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the defuzzifier in Python. |
configure
¶
configure(parameters: str) -> None
Configure the defuzzifier with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters
|
str
|
list of space-separated parameter values |
required |
defuzzify
abstractmethod
¶
Implement the defuzzification of the term using the given range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
term to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
defuzzified value. |
LargestOfMaximum
¶
Bases: IntegralDefuzzifier
Integral defuzzifier that computes the largest value of the maximum membership function of a fuzzy set.
related
Functions¶
defuzzify
¶
Compute the largest value of the maximum membership function of a fuzzy set.
The defuzzification process integrates over the fuzzy set using the given range. The integration algorithm is the midpoint rectangle method (https://en.wikipedia.org/wiki/Rectangle_method).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
fuzzy set to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
largest \(x\)-coordinate of the maximum membership function value in the fuzzy set |
MeanOfMaximum
¶
Bases: IntegralDefuzzifier
Integral defuzzifier that computes the mean value of the maximum membership function of a fuzzy set.
related
Functions¶
defuzzify
¶
Compute the mean value of the maximum membership function of a fuzzy set.
The defuzzification process integrates over the fuzzy set using the given range. The integration algorithm is the midpoint rectangle method (https://en.wikipedia.org/wiki/Rectangle_method).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
fuzzy set to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
mean \(x\)-coordinate of the maximum membership function value in the fuzzy set |
SmallestOfMaximum
¶
Bases: IntegralDefuzzifier
Integral defuzzifier that computes the smallest value of the maximum membership function of a fuzzy set.
related
Functions¶
defuzzify
¶
Compute the smallest value of the maximum membership function in the fuzzy set.
The defuzzification process integrates over the fuzzy set using the given range. The integration algorithm is the midpoint rectangle method (https://en.wikipedia.org/wiki/Rectangle_method).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
fuzzy set to defuzzify |
required |
minimum
|
float
|
value to start defuzzification |
required |
maximum
|
float
|
value to end defuzzification |
required |
Returns:
Type | Description |
---|---|
Scalar
|
smallest \(x\)-coordinate of the maximum membership function value in the fuzzy set |
WeightedAverage
¶
Bases: WeightedDefuzzifier
Weighted defuzzifier that computes the weighted average of a fuzzy set represented by an Aggregated term.
related
Functions¶
defuzzify
¶
Computes the weighted average of the fuzzy set.
The fuzzy set is represented by an Aggregated Term as \(y = \sum_i{w_iz_i}\), where \(w_i\) is the activation degree of term \(i\), and \(z_i = \mu_i(w_i)\).
In Takagi-Sugeno controllers, the membership function \(\mu_i(w_i)\) is generally a Constant, Linear, or Function term, which typically disregards the \(w_i\) value.
Warning
From version 8, the aggregation operator is used to aggregate multiple activations of the same term.
In previous versions, the implication and aggregation operators are not used for weighted defuzzification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
term to defuzzify |
required |
minimum
|
float
|
irrelevant |
nan
|
maximum
|
float
|
irrelevant |
nan
|
Returns:
Type | Description |
---|---|
Scalar
|
weighted average of the fuzzy set |
WeightedDefuzzifier
¶
Bases: Defuzzifier
Abstract class for defuzzifiers that compute a weighted function on the fuzzy set.
related
Attributes¶
Classes¶
Type
¶
Functions¶
__init__
¶
__repr__
¶
__repr__() -> str
Return the code to construct the defuzzifier in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the defuzzifier in Python. |
configure
¶
configure(parameters: str) -> None
Configure the defuzzifier with the parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parameters
|
str
|
list of space-separated parameter values |
required |
defuzzify
abstractmethod
¶
Implement the defuzzification of the term.
Warning
From version 8, the aggregation operator is used to aggregate multiple activations of the same term.
In previous versions, the implication and aggregation operators are not used for weighted defuzzification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
term to defuzzify |
required |
minimum
|
float
|
irrelevant |
nan
|
maximum
|
float
|
irrelevant |
nan
|
Returns:
Type | Description |
---|---|
Scalar
|
defuzzified value |
infer_type
classmethod
¶
WeightedSum
¶
Bases: WeightedDefuzzifier
Weighted defuzzifier that computes the weighted sum of a fuzzy set represented by an Aggregated term.
related
Functions¶
defuzzify
¶
Computes the weighted sum of the fuzzy set.
The fuzzy set is represented by Aggregated term as \(y = \sum_i{w_iz_i}\), where \(w_i\) is the activation degree of term \(i\), and \(z_i = \mu_i(w_i)\).
In Takagi-Sugeno controllers, the membership function \(\mu_i(w_i)\) is generally a Constant, Linear, or Function term, which typically disregards the \(w_i\) value.
Warning
From version 8, the aggregation operator is used to aggregate multiple activations of the same term.
In previous versions, the implication and aggregation operators are not used for weighted defuzzification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
term
|
Term
|
term to defuzzify |
required |
minimum
|
float
|
irrelevant |
nan
|
maximum
|
float
|
irrelevant |
nan
|
Returns:
Type | Description |
---|---|
Scalar
|
weighted sum of the fuzzy set |