Intuitionistic Fuzzy Sets

class pyifdm.IFS.ifs.IFS(membership, non_membership, uncertainty=None)[source]

Bases: object

Represents an Intuitionistic Fuzzy Set (IFS) with membership, non-membership, and uncertainty values.

Parameters: - membership (float): The degree to which an element belongs to the set. - non_membership (float): The degree to which an element does not belong to the set. - uncertainty (float, optional): The degree of uncertainty in the membership assignment.

If not provided, it is calculated as 1 - membership - non_membership.

Methods: - __and__(self, other): Intersection operator for IFS. - __or__(self, other): Union operator for IFS. - __invert__(self): Complement operator for IFS. - owa_aggregation(self, weights): Ordered Weighted Averaging (OWA) aggregation operator for IFS.

Example: ` # Example Usage: ifs1 = IFS(0.6, 0.2) ifs2 = IFS(0.8, 0.1) intersection_result = ifs1 & ifs2 union_result = ifs1 | ifs2 complement_result = ~ifs1 owa_weights = [0.3, 0.4, 0.3] owa_result = ifs1.owa_aggregation(owa_weights) `

The IFS class supports standard set operations and aggregation, providing a versatile representation for handling uncertainty and imprecision in decision-making.

__add__(other)[source]

Compute the addition of two IFS.

Parameters: - other (IFS): The IFS to add.

Returns: IFS: The resulting IFS after addition.

__and__(other)[source]

Compute the intersection of two IFS.

Parameters: - other (IFS): The IFS to intersect with.

Returns: IFS: The resulting IFS after intersection.

__eq__(other)[source]

Check if two IFS are equal.

Parameters: - other (IFS): The IFS to compare with.

Returns: bool: True if the IFS are equal, False otherwise.

__init__(membership, non_membership, uncertainty=None)[source]

Initialize an Intuitionistic Fuzzy Set (IFS).

Parameters: - membership (float): The degree to which an element belongs to the set. - non_membership (float): The degree to which an element does not belong to the set. - uncertainty (float, optional): The degree of uncertainty in the membership assignment.

If not provided, it is calculated as 1 - membership - non_membership.

__invert__()[source]

Compute the complement of the IFS.

Returns: IFS: The resulting complemented IFS.

__mul__(other)[source]

Compute the multiplication of two IFS.

Parameters: - other (IFS): The IFS to multiply.

Returns: IFS: The resulting IFS after multiplication.

__or__(other)[source]

Compute the union of two IFS.

Parameters: - other (IFS): The IFS to union with.

Returns: IFS: The resulting IFS after union.

__pow__(y)[source]

Compute the division of two IFS.

Parameters: - other (IFS): The IFS to divide.

Returns: IFS: The resulting IFS after division.

__repr__()[source]

Return a string representation of the IFS.

Returns: str: A string representation of the IFS.

__str__()[source]

Return a human-readable string representation of the IFS.

Returns: str: A string representation of the IFS.

__sub__(other)[source]

Compute the subtraction of two IFS.

Parameters: - other (IFS): The IFS to subtract.

Returns: IFS: The resulting IFS after subtraction.

__truediv__(other)[source]

Compute the division of two IFS.

Parameters: - other (IFS): The IFS to divide.

Returns: IFS: The resulting IFS after division.

dominance(other)[source]

Check if one IFS dominates another.

Parameters: - other (IFS): The IFS to compare with.

Returns: bool: True if the current IFS dominates the other, False otherwise.

fuzzy_relation(other)[source]

Compute the fuzzy relation matrix between two IFS.

Parameters: - other (IFS): The IFS to form a relation with.

Returns: np.ndarray: Fuzzy relation matrix.

owa_aggregation(weights)[source]

Compute the Ordered Weighted Averaging (OWA) aggregation of the IFS.

Parameters: - weights (list): A list of weights for each component (non-membership, uncertainty, membership).

Returns: float: The result of the OWA aggregation.

similarity_jaccard(other)[source]

Compute the Jaccard similarity coefficient between two IFS.

Parameters: - other (IFS): The IFS to compare with.

Returns: float: Jaccard similarity coefficient.