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 4e28db0 commit 3159483
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyit2fls/learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ class T1Fuzzy_ML_Model:
"""
def __init__(self, P, N, M, mf, c=1.0):
self.p = reshape(P[:-M], (M, N, 2, ))
for i in range(M):
for j in range(N):
self.p[i][j][1] = abs(self.p[i][j][1])

self.q = P[-M:]
self.N = N
self.M = M
Expand Down Expand Up @@ -248,8 +252,8 @@ def fit(self, X, y):
else:
raise ValueError(self.algorithm + " algorithm is not supported!")

self.model = T1Fuzzy_ML_Model(self.params, self.TSKN, self.TSKM,
[[self.mf, ] * self.TSKN, ] * self.TSKM)
self.model = T1Fuzzy_ML_Model(self.params, self.N, self.M,
[[self.mf, ] * self.N, ] * self.M)
return self.error(self.params, X, y)

def score(self, X):
Expand Down

0 comments on commit 3159483

Please sign in to comment.