mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
03ae118193
commit
5f14a63eda
|
@ -52,7 +52,7 @@ class GaussianFuzzySet:
|
||||||
>>> GaussianFuzzySet("Medium", 0, 1).membership(1)
|
>>> GaussianFuzzySet("Medium", 0, 1).membership(1)
|
||||||
0.6065306597126334
|
0.6065306597126334
|
||||||
"""
|
"""
|
||||||
|
|
||||||
membership_value = np.exp(-0.5 * ((x - self.mean) / self.std_dev) ** 2)
|
membership_value = np.exp(-0.5 * ((x - self.mean) / self.std_dev) ** 2)
|
||||||
# Directly return for non-complement or return 1 - membership for complement
|
# Directly return for non-complement or return 1 - membership for complement
|
||||||
return membership_value if not self.is_complement else 1 - membership_value
|
return membership_value if not self.is_complement else 1 - membership_value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user