soft.fuzzy.relation.discrete package

Submodules

soft.fuzzy.relation.discrete.complement module

Implements the various fuzzy complement definitions for the discrete fuzzy sets.

soft.fuzzy.relation.discrete.complement.standard_complement(fuzzy_set)

Obtains the standard complement of a fuzzy set as defined by Lotfi A. Zadeh.

Returns True if successful, else returns False.

Parameters:

fuzzy_set ('OrdinaryDiscreteFuzzySet')

Returns:

success

Return type:

‘bool’

soft.fuzzy.relation.discrete.extension module

Implementation of the special fuzzy set and the alpha cut operation for discrete fuzzy sets.

class soft.fuzzy.relation.discrete.extension.AlphaCut(fuzzy_set, alpha: float, name: str | None = None)

Bases: BaseDiscreteFuzzySet

The alpha cut of a fuzzy set yields a crisp set.

degree(element)

Calculates degree of membership for the provided ‘element’ where element is a(n) int/float.

Parameters:

element ('float') – The element is from the universe of discourse X.

Returns:

membership – The degree of membership for the element.

Return type:

‘float’

class soft.fuzzy.relation.discrete.extension.DiscreteFuzzyRelation(formulas: ~typing.List[~soft.fuzzy.sets.discrete.DiscreteFuzzySet], name=None, mode: callable = <built-in function min>)

Bases: BaseDiscreteFuzzySet

A fuzzy relation is a fuzzy set of ordered pairs. This class is a subclass of DiscreteFuzzySet. The DiscreteFuzzyRelation class is used to represent a fuzzy relation between two universes of discourse. More specifically, the DiscreteFuzzyRelation class is used to represent a fuzzy relation such as t-norm or s-norm discrete fuzzy relations.

degree(element: int | float)

Calculates the degree of membership for the provided element value where element is a(n) int/float.

Parameters:

element – The element is from the universe of discourse X.

Returns:

The degree of membership for the element.

class soft.fuzzy.relation.discrete.extension.SpecialFuzzySet(fuzzyset, alpha, name=None)

Bases: BaseDiscreteFuzzySet

The special fuzzy set membership function for a given element x in the universe of discourse X, is defined as the alpha value multiplied by the element x’s degree of membership within the fuzzy set’s alpha cut.

degree(element: float) float

Calculates degree of membership for the provided ‘element’ where element is a(n) int/float.

Parameters:

element ('float') – The element is from the universe of discourse X.

Returns:

membership – The degree of membership for the element.

Return type:

‘float’

height() float

Calculates the height of the special fuzzy set.

Returns:

height – The height, or supremum, of the Special Fuzzy Set.

Return type:

‘float’

soft.fuzzy.relation.discrete.snorm module

Implements the s-norm fuzzy relations.

class soft.fuzzy.relation.discrete.snorm.StandardUnion(fuzzy_sets: List[DiscreteFuzzySet], name=None)

Bases: DiscreteFuzzyRelation

A standard union of one or more ordinary fuzzy sets.

soft.fuzzy.relation.discrete.tnorm module

Implements the t-norm fuzzy relations.

class soft.fuzzy.relation.discrete.tnorm.StandardIntersection(fuzzy_sets: List[DiscreteFuzzySet], name=None)

Bases: DiscreteFuzzyRelation

A standard intersection of one or more ordinary fuzzy sets.

Module contents