Skip to content

WeightedAverage

WeightedAverage

Bases: WeightedDefuzzifier

Weighted defuzzifier that computes the weighted average of a fuzzy set represented by an Aggregated term.

related

Functions

defuzzify

defuzzify(term: Term, minimum: float = nan, maximum: float = nan) -> Scalar

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