Skip to content

Commit

Permalink
Minor bug fixes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Haghrah committed Nov 27, 2024
1 parent 3159483 commit 24fb106
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyit2fls/learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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., ]), ),
Expand All @@ -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., ])))
Expand Down

0 comments on commit 24fb106

Please sign in to comment.