Skip to content

Norm

AlgebraicProduct

Bases: TNorm

TNorm to compute the algebraic product of any two values.

Equation

\(a \otimes b=a\times b\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the algebraic product of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=a\times b\)

AlgebraicSum

Bases: SNorm

SNorm to compute the algebraic sum of values any two values.

Equation

\(a \oplus b=a+b-(a \times b)\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the algebraic sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=a+b-(a \times b)\)

BoundedDifference

Bases: TNorm

TNorm to compute the bounded difference between any two values.

Equation

\(a \otimes b=\max(0, a + b - 1)\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the bounded difference between two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=\max(0, a + b - 1)\)

BoundedSum

Bases: SNorm

SNorm to compute the bounded sum of any two values.

Equation

\(a \oplus b=\min(1, a+b)\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the bounded sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\min(1, a+b)\)

DrasticProduct

Bases: TNorm

TNorm to compute the drastic product of any two values.

Equation

\(a \otimes b = \begin{cases} \min(a,b) & \mbox{if } \max(a,b)=1 \cr 0 & \mbox{otherwise} \end{cases}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the drastic product of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value.

required

Returns:

Type Description
Scalar

\(a \otimes b = \begin{cases} \min(a,b) & \mbox{if } \max(a,b)=1 \cr 0 & \mbox{otherwise} \end{cases}\)

DrasticSum

Bases: SNorm

SNorm to compute the drastic sum of any two values.

Equation

\(a \oplus b=\begin{cases} \max(a,b) & \mbox{if } \min(a,b)=0 \cr 1 & \mbox{otherwise} \end{cases}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the drastic sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\begin{cases} \max(a,b) & \mbox{if } \min(a,b)=0 \cr 1 & \mbox{otherwise} \end{cases}\)

EinsteinProduct

Bases: TNorm

TNorm to compute the Einstein product of any two values.

Equation

\(a \otimes b=\dfrac{a\times b}{2-(a+b-a\times b)}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the Einstein product of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=\dfrac{a\times b}{2-(a+b-a\times b)}\)

EinsteinSum

Bases: SNorm

SNorm to compute the einstein sum of any two values.

Equation

\(a \oplus b=\dfrac{a+b}{1+a \times b}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the Einstein sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\dfrac{a+b}{1+a \times b}\)

HamacherProduct

Bases: TNorm

TNorm to compute the Hamacher product of any two values.

Equation

\(a \otimes b=\dfrac{a \times b}{a+b- a \times b}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the Hamacher product of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=\dfrac{a \times b}{a+b- a \times b}\)

HamacherSum

Bases: SNorm

SNorm to compute the Hamacher sum of any two values.

Equation

\(a \oplus b=\dfrac{a+b-2(\times a \times b)}{1-a\times b}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the Hamacher sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\dfrac{a+b-2(\times a \times b)}{1-a\times b}\)

Maximum

Bases: SNorm

SNorm to compute the maximum of any two values.

Equation

\(a \oplus b=\max(a,b)\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Computes the maximum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\max(a,b)\)

Minimum

Bases: TNorm

TNorm that computes the minimum of any two values.

Equation

\(a \otimes b=\min(a,b)\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the minimum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=\min(a,b)\)

NilpotentMaximum

Bases: SNorm

SNorm to compute the nilpotent maximum of any two values.

Equation

\(a \oplus b=\begin{cases} \max(a,b) & \mbox{if } a+b<0 \cr 1 & \mbox{otherwise} \end{cases}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the nilpotent maximum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\begin{cases} \max(a,b) & \mbox{if } a+b<0 \cr 1 & \mbox{otherwise} \end{cases}\)

NilpotentMinimum

Bases: TNorm

TNorm to compute the nilpotent minimum of any two values.

Equation

\(a \otimes b=\begin{cases} \min(a,b) & \mbox{if }a+b>1 \cr 0 & \mbox{otherwise} \end{cases}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the nilpotent minimum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b=\begin{cases} \min(a,b) & \mbox{if }a+b>1 \cr 0 & \mbox{otherwise} \end{cases}\)

Norm

Bases: ABC

Abstract class for norms.

fuzzylite.norm.TNorm fuzzylite.norm.SNorm
fuzzylite.norm.AlgebraicProduct fuzzylite.norm.AlgebraicSum
fuzzylite.norm.BoundedDifference fuzzylite.norm.BoundedSum
fuzzylite.norm.DrasticProduct fuzzylite.norm.DrasticSum
fuzzylite.norm.EinsteinProduct fuzzylite.norm.EinsteinSum
fuzzylite.norm.HamacherProduct fuzzylite.norm.HamacherSum
fuzzylite.norm.Minimum fuzzylite.norm.Maximum
fuzzylite.norm.NilpotentMinimum fuzzylite.norm.NilpotentMaximum
fuzzylite.norm.NormalizedSum
fuzzylite.norm.UnboundedSum
related

Functions

__repr__

__repr__() -> str

Return the code to construct the norm in Python.

Returns:

Type Description
str

code to construct the norm in Python.

__str__

__str__() -> str

Return the code to construct the norm in the FuzzyLite Language.

Returns:

Type Description
str

code to construct the norm in the FuzzyLite Language.

compute abstractmethod

compute(a: Scalar, b: Scalar) -> Scalar

Implement the norm.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

norm between \(a\) and \(b\)

NormFunction

Bases: TNorm, SNorm

TNorm or SNorm based on a term function on any two values.

Equation

\(a \oplus b = a \otimes b = f(a,b)\)

This Norm is not registered in the SNormFactory or TNormFactory.

related

Attributes

function instance-attribute

function = function

Functions

__init__

__init__(function: Function) -> None

Constructor.

Parameters:

Name Type Description Default
function Function

function \(f(a,b)\).

required

__repr__

__repr__() -> str

Return the code to construct the norm in Python.

Returns:

Type Description
str

code to construct the norm in Python.

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the Norm using \(f(a,b)\).

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=f(a,b)\)

NormLambda

Bases: TNorm, SNorm

TNorm or SNorm based on a \(\lambda\) function on any two values.

Equation

\(a \oplus b = a \otimes b = \lambda(a,b)\)

This Norm is not registered in the SNormFactory or TNormFactory.

related

Attributes

function instance-attribute

function = function

Functions

__init__

__init__(function: Callable[[Scalar, Scalar], Scalar]) -> None

Constructor.

Parameters:

Name Type Description Default
function Callable[[Scalar, Scalar], Scalar]

function \(\lambda(a,b)\).

required

__repr__

__repr__() -> str

Return the code to construct the norm in Python.

Returns:

Type Description
str

code to construct the norm in Python.

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the norm using \(\lambda(a,b)\).

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b = a \otimes b = \lambda(a,b)\)

NormalizedSum

Bases: SNorm

SNorm to compute the normalized sum of any two values.

Equation

\(a \oplus b=\dfrac{a+b}{\max(1, a + b)}\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the normalized sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=\dfrac{a+b}{\max(1, a + b)}\)

SNorm

Bases: Norm

Base class for S-Norms, used as fuzzy logic operator for disjunction and aggregation in rule blocks.

fuzzylite.norm.SNorm
fuzzylite.norm.AlgebraicSum
fuzzylite.norm.BoundedSum
fuzzylite.norm.DrasticSum
fuzzylite.norm.EinsteinSum
fuzzylite.norm.HamacherSum
fuzzylite.norm.Maximum
fuzzylite.norm.NilpotentMaximum
fuzzylite.norm.NormalizedSum
fuzzylite.norm.UnboundedSum
related

Functions

compute abstractmethod

compute(a: Scalar, b: Scalar) -> Scalar

Implement the S-Norm \(a \oplus b\).

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b\)

TNorm

Bases: Norm

Base class for T-Norms, used as fuzzy logic operator for conjunction and implication in rule blocks.

fuzzylite.norm.TNorm
fuzzylite.norm.AlgebraicProduct
fuzzylite.norm.BoundedDifference
fuzzylite.norm.DrasticProduct
fuzzylite.norm.EinsteinProduct
fuzzylite.norm.HamacherProduct
fuzzylite.norm.Minimum
fuzzylite.norm.NilpotentMinimum
related

Functions

compute abstractmethod

compute(a: Scalar, b: Scalar) -> Scalar

Implement the T-Norm \(a \otimes b\).

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \otimes b\)

UnboundedSum

Bases: SNorm

SNorm to compute the sum of any two values.

Equation

\(a \oplus b=a+b\)

related

Functions

compute

compute(a: Scalar, b: Scalar) -> Scalar

Compute the sum of two membership function values.

Parameters:

Name Type Description Default
a Scalar

membership function value

required
b Scalar

membership function value

required

Returns:

Type Description
Scalar

\(a \oplus b=a+b\)