Bugfix in mackey_glass
This commit is contained in:
parent
8fde4c4ea6
commit
ae6923084d
@ -1,7 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
def get_data(b=0.1, c=0.2, tau=17, initial_values = np.linspace(0.5,1.5,18), iterations=1000):
|
def get_data(b=0.1, c=0.2, tau=17, initial_values = np.linspace(0.5,1.5, 18), iterations=1000):
|
||||||
'''
|
'''
|
||||||
Mackey, M. C. and Glass, L. (1977). Oscillation and chaos in physiological control systems.
|
Mackey, M. C. and Glass, L. (1977). Oscillation and chaos in physiological control systems.
|
||||||
Science, 197(4300):287-289.
|
Science, 197(4300):287-289.
|
||||||
|
@ -8,8 +8,10 @@ import matplotlib.pyplot as plt
|
|||||||
from pyFTS.common import Util as cUtil
|
from pyFTS.common import Util as cUtil
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
from pyFTS.data import TAIEX, NASDAQ, SP500, artificial
|
from pyFTS.data import TAIEX, NASDAQ, SP500, artificial, mackey_glass
|
||||||
|
|
||||||
|
mackey_glass.get_data()
|
||||||
|
'''
|
||||||
datasets = {
|
datasets = {
|
||||||
"TAIEX": TAIEX.get_data()[:4000],
|
"TAIEX": TAIEX.get_data()[:4000],
|
||||||
"SP500": SP500.get_data()[10000:14000],
|
"SP500": SP500.get_data()[10000:14000],
|
||||||
@ -54,7 +56,7 @@ partitions = {'CMIV': {'BoxCox(0)': 36, 'Differential(1)': 11, 'None': 8},
|
|||||||
|
|
||||||
tag = 'benchmarks'
|
tag = 'benchmarks'
|
||||||
|
|
||||||
'''
|
|
||||||
for ds in datasets.keys():
|
for ds in datasets.keys():
|
||||||
dataset = datasets[ds]
|
dataset = datasets[ds]
|
||||||
|
|
||||||
@ -74,7 +76,7 @@ for ds in datasets.keys():
|
|||||||
partitions=[partitioning],
|
partitions=[partitioning],
|
||||||
progress=False, type='point',
|
progress=False, type='point',
|
||||||
file="nsfts_benchmarks.db", dataset=ds, tag=tag)
|
file="nsfts_benchmarks.db", dataset=ds, tag=tag)
|
||||||
'''
|
|
||||||
train_split = 200
|
train_split = 200
|
||||||
test_split = 2000
|
test_split = 2000
|
||||||
for ds in datasets.keys():
|
for ds in datasets.keys():
|
||||||
@ -99,7 +101,7 @@ for ds in datasets.keys():
|
|||||||
forecasts = model.predict(test)
|
forecasts = model.predict(test)
|
||||||
|
|
||||||
#print(forecasts)
|
#print(forecasts)
|
||||||
'''
|
|
||||||
partitioning = partitions[ds][tf]
|
partitioning = partitions[ds][tf]
|
||||||
|
|
||||||
bchmk.sliding_window_benchmarks(dataset, 2000, train=0.2, inc=0.2,
|
bchmk.sliding_window_benchmarks(dataset, 2000, train=0.2, inc=0.2,
|
||||||
|
Loading…
Reference in New Issue
Block a user