IFTS versão funcional
This commit is contained in:
parent
af4548b574
commit
b58d1df00c
10
ifts.py
10
ifts.py
@ -46,7 +46,9 @@ class IntervalFTS(hofts.HighOrderFTS):
|
|||||||
|
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
for k in np.arange(self.order-1,l):
|
for k in np.arange(self.order,l):
|
||||||
|
|
||||||
|
print(k)
|
||||||
|
|
||||||
flrs = []
|
flrs = []
|
||||||
mvs = []
|
mvs = []
|
||||||
@ -58,7 +60,9 @@ class IntervalFTS(hofts.HighOrderFTS):
|
|||||||
count = 0
|
count = 0
|
||||||
lags = {}
|
lags = {}
|
||||||
if self.order > 1:
|
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)
|
mb = common.fuzzyInstance(instance, self.sets)
|
||||||
tmp = np.argwhere( mb )
|
tmp = np.argwhere( mb )
|
||||||
idx = np.ravel(tmp) #flat the array
|
idx = np.ravel(tmp) #flat the array
|
||||||
@ -81,7 +85,7 @@ class IntervalFTS(hofts.HighOrderFTS):
|
|||||||
flrs.append(flrg)
|
flrs.append(flrg)
|
||||||
|
|
||||||
# Acha a pertinência geral de cada 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:
|
else:
|
||||||
|
|
||||||
mv = common.fuzzyInstance(ndata[k],self.sets)
|
mv = common.fuzzyInstance(ndata[k],self.sets)
|
||||||
|
Loading…
Reference in New Issue
Block a user