FuzzySet(representativeValue)

Base class for fuzzy sets. This type of sets are defined by a membership function which can be any arbitrary shape but are typically triangular or trapezoidal. They define a gradual transition from regions completely outside the set to regions completely within the set, thereby enabling a value to have partial membership to a set.

This class is derived from FuzzyTerm so it can be directly used in fuzzy rules. According to the composite design pattern, a fuzzy set can be considered as an atomic fuzzy term.

new FuzzySet(representativeValue)

Constructs a new fuzzy set with the given values.

Parameters:
Name Type Default Description
representativeValue Number 0

The maximum of the set's membership function.

Author:

Extends

Members

degreeOfMembership :Number

Represents the degree of membership to this fuzzy set.

Default Value:
  • 0

left :Number

Represents the left border of this fuzzy set.

Default Value:
  • 0

representativeValue :Number

The maximum of the set's membership function. For instance, if the set is triangular then this will be the peak point of the triangular. If the set has a plateau then this value will be the mid point of the plateau. Used to avoid runtime calculations.

Default Value:
  • 0

Represents the right border of this fuzzy set.

Default Value:
  • 0

readonly uuid :String

Unique ID, primarily used in context of serialization/deserialization.

Methods

clearDegreeOfMembership() → {FuzzySet}

Clears the degree of membership value.

Returns:
FuzzySet -

A reference to this fuzzy set.

Overrides:

computeDegreeOfMembership(value) → {Number}

Computes the degree of membership for the given value. Notice that this method does not set FuzzySet#degreeOfMembership since other classes use it in order to calculate intermediate degree of membership values. This method be implemented by all concrete fuzzy set classes.

Parameters:
Name Type Description
value Number

The value used to calculate the degree of membership.

Returns:
Number -

The degree of membership.

fromJSON(json) → {FuzzySet}

Restores this instance from the given JSON object.

Parameters:
Name Type Description
json Object

The JSON object.

Returns:
FuzzySet -

A reference to this fuzzy set.

getDegreeOfMembership() → {Number}

Returns the degree of membership.

Returns:
Number -

Degree of membership.

Overrides:

toJSON() → {Object}

Transforms this instance into a JSON object.

Returns:
Object -

The JSON object.

Overrides:

updateDegreeOfMembership() → {FuzzySet}

Updates the degree of membership by the given value. This method is used when the set is part of a fuzzy rule's consequent.

Returns:
FuzzySet -

A reference to this fuzzy set.

Overrides: