From 24fb106a466026ac467d8b5ecbe022c1d4f9c58b Mon Sep 17 00:00:00 2001 From: haghrah Date: Wed, 27 Nov 2024 16:06:45 +0330 Subject: [PATCH] Minor bug fixes ... --- pyit2fls/learning.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyit2fls/learning.py b/pyit2fls/learning.py index 332ad11..143ac9a 100644 --- a/pyit2fls/learning.py +++ b/pyit2fls/learning.py @@ -286,14 +286,14 @@ def get_T1Mamdani(self, std=1., ): for j in range(self.N): domain = linspace(self.model.p[i][j][0] - 5. * self.model.p[i][j][1], # 5 x std before mean self.model.p[i][j][0] + 5. * self.model.p[i][j][1], # 5 x std after mean - 10. * self.model.p[i][j][1] * 100) # 100 points for each unit + int(10. * self.model.p[i][j][1] * 100)) # 100 points for each unit antecedent.append(("X" + str(i + 1), T1FS(domain, gaussian_mf, params=[self.model.p[i][j][0], self.model.p[i][j][1], 1., ]))) domain = linspace(self.model.q[i] - 5. * std, # 5 x std before mean self.model.q[i] + 5. * std, # 5 x std after mean - 10. * std * 100.) # 100 points for each unit + int(10. * std * 100.)) # 100 points for each unit consequent = [("Y", T1FS(domain, gaussian_mf, params=[self.model.q[i], std, 1., ]), ), @@ -320,7 +320,7 @@ def get_T1TSK(self, std=1., ): for j in range(self.N): domain = linspace(self.model.p[i][j][0] - 5. * self.model.p[i][j][1], # 5 x std before mean self.model.p[i][j][0] + 5. * self.model.p[i][j][1], # 5 x std after mean - 10. * self.model.p[i][j][1] * 100) # 100 points for each unit + int(10. * self.model.p[i][j][1] * 100)) # 100 points for each unit antecedent.append(("X" + str(i + 1), T1FS(domain, gaussian_mf, params=[self.model.p[i][j][0], self.model.p[i][j][1], 1., ])))