Skip to content

IntegralDefuzzifier

IntegralDefuzzifier

Bases: Defuzzifier

Abstract class for defuzzifiers that integrate over the fuzzy set.

related

Attributes

default_resolution class-attribute instance-attribute

default_resolution: Final[int] = 1000

resolution instance-attribute

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

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

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.

parameters

parameters() -> str

Return the parameters to configure the defuzzifier.

Returns:

Type Description
str

parameters to configure the defuzzifier.