mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37:02 +00:00
Update gaussian_fuzzyset.py
This commit is contained in:
parent
5f14a63eda
commit
63603cfe51
|
@ -7,9 +7,11 @@ https://en.wikipedia.org/wiki/Membership_function_(mathematics)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import numpy as np
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
@ -19,10 +21,11 @@ class GaussianFuzzySet:
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
name: The name or label of the fuzzy set.
|
name: The name or label of the fuzzy set.
|
||||||
mean: The mean value (center) of the Gaussian fuzzy set.
|
mean: The mean value (center) of the Gaussianfuzzy set.
|
||||||
std_dev: The standard deviation (controls the spread) of the Gaussian fuzzy set.
|
std_dev: The standard deviation (controls the spread) of
|
||||||
is_complement: Indicates whether this is the complement of the original fuzzy set.
|
the Gaussian fuzzy set.
|
||||||
|
is_complement: Indicates whether this is the complement
|
||||||
|
of the original fuzzy set.
|
||||||
Methods:
|
Methods:
|
||||||
membership(x): Calculate the membership value of an input 'x' in the fuzzy set.
|
membership(x): Calculate the membership value of an input 'x' in the fuzzy set.
|
||||||
complement(): Create a new GaussianFuzzySet instance representing the complement.
|
complement(): Create a new GaussianFuzzySet instance representing the complement.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user