Bugfixes in data.artificial.SignalEmulator
This commit is contained in:
parent
9125582c9c
commit
88bf591dc1
@ -163,8 +163,14 @@ def _append(additive, start, before, new):
|
|||||||
else:
|
else:
|
||||||
for k in range(start):
|
for k in range(start):
|
||||||
new.insert(0,0)
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,5 +17,8 @@ from pyFTS.common import Transformations, Membership
|
|||||||
from pyFTS.data import artificial
|
from pyFTS.data import artificial
|
||||||
|
|
||||||
cd = artificial.SignalEmulator()
|
cd = artificial.SignalEmulator()
|
||||||
cd.stationary_gaussian(10,3,length=100)
|
cd.stationary_gaussian(1,.2,length=10, it=1)
|
||||||
cd.incremental_gaussian(0.5,0,start=100,length=200)
|
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()))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user