From b58d1df00cf7bfb9e5d2f2af5e6d86c92d8a6b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido=20de=20Lima=20e=20Silva?= Date: Tue, 25 Oct 2016 07:58:43 -0200 Subject: [PATCH] =?UTF-8?q?IFTS=20vers=C3=A3o=20funcional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ifts.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ifts.py b/ifts.py index 2ffb149..cd4c756 100644 --- a/ifts.py +++ b/ifts.py @@ -46,7 +46,9 @@ class IntervalFTS(hofts.HighOrderFTS): ret = [] - for k in np.arange(self.order-1,l): + for k in np.arange(self.order,l): + + print(k) flrs = [] mvs = [] @@ -58,7 +60,9 @@ class IntervalFTS(hofts.HighOrderFTS): count = 0 lags = {} if self.order > 1: - for instance in ndata[k-self.order : k]: + subset = ndata[k-self.order : k ] + print(subset) + for instance in subset: mb = common.fuzzyInstance(instance, self.sets) tmp = np.argwhere( mb ) idx = np.ravel(tmp) #flat the array @@ -81,7 +85,7 @@ class IntervalFTS(hofts.HighOrderFTS): flrs.append(flrg) # Acha a pertinĂȘncia geral de cada FLRG - mvs.append(min(self.getSequenceMembership(ndata[k-self.order : k], flrg.LHS))) + mvs.append(min(self.getSequenceMembership(subset, flrg.LHS))) else: mv = common.fuzzyInstance(ndata[k],self.sets)