Bugfixes in data.artificial.SignalEmulator

This commit is contained in:
Petrônio Cândido 2019-02-20 16:23:18 -03:00
parent 9125582c9c
commit 88bf591dc1
2 changed files with 13 additions and 4 deletions

View File

@ -163,8 +163,14 @@ def _append(additive, start, before, new):
else:
for k in range(start):
new.insert(0,0)
tmp = np.array(before) + np.array(new)
return tmp
l = len(before)
if len(before) == 0:
tmp = np.array(new)
else:
tmp = np.array(before) + np.array(new[:l])
return tmp.tolist()

View File

@ -17,5 +17,8 @@ from pyFTS.common import Transformations, Membership
from pyFTS.data import artificial
cd = artificial.SignalEmulator()
cd.stationary_gaussian(10,3,length=100)
cd.incremental_gaussian(0.5,0,start=100,length=200)
cd.stationary_gaussian(1,.2,length=10, it=1)
cd.incremental_gaussian(0.5, 0,start=5,length=5)
#cd.stationary_gaussian(3,.2,length=10, it=1, additive=True)
print(len(cd.run()))