def main(): fts = sFTS(do_plots=False) for dataset_name in dataset_names: dataset = get_dataset(dataset_name) bchmk.sliding_window_benchmarks( dataset, 1000, train=0.5, inc=0.2, benchmark_models=True, benchmark_methods=benchmark_methods, benchmark_methods_parameters=benchmark_methods_parameters, models=[fts], build_methods=False, transformations=[None], orders=[1, 2, 3], partitions=[35], # np.arange(10,100,2), progress=False, type='point', steps_ahead=[1], #distributed=True, nodes=['192.168.0.110', '192.168.0.107','192.168.0.106'],\n", file="benchmarks.db", dataset=dataset_name, tag='incremental')
''' model = knn.KNearestNeighbors(order=3) #model = ensemble.AllMethodEnsembleFTS("", partitioner=partitioner) #model = arima.ARIMA("", order=(2,0,2)) #model = quantreg.QuantileRegression("", order=2, dist=True) #model.append_transformation(tdiff) model.fit(dataset[:800]) print(Measures.get_distribution_statistics(dataset[800:1000], model)) #tmp = model.predict(dataset[800:1000], type='distribution') #for tmp2 in tmp: # print(tmp2) #''' ''' bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2, methods=[hofts.HighOrderFTS], #[pwfts.ProbabilisticWeightedFTS], benchmark_models=False, transformations=[None], orders=[1, 2, 3], partitions=np.arange(30, 80, 5), progress=False, type="point", #steps_ahead=[1,2,4,6,8,10], distributed=True, nodes=['192.168.0.110', '192.168.0.107', '192.168.0.106'], file="benchmarks.db", dataset="TAIEX", tag="comparisons") bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2,
print(model) ''' #dataset = SP500.get_data()[11500:16000] #dataset = NASDAQ.get_data() #print(len(dataset)) bchmk.sliding_window_benchmarks( dataset, 1000, train=0.8, inc=0.2, methods=[chen.ConventionalFTS], #[pwfts.ProbabilisticWeightedFTS], benchmark_models=False, transformations=[None], #orders=[1, 2, 3], partitions=np.arange(10, 100, 2), progress=False, type="point", #steps_ahead=[1,2,4,6,8,10], distributed=False, nodes=['192.168.0.110', '192.168.0.107', '192.168.0.106'], file="benchmarks.db", dataset="TAIEX", tag="comparisons") bchmk.sliding_window_benchmarks( dataset, 1000, train=0.8, inc=0.2, methods=[chen.ConventionalFTS], # [pwfts.ProbabilisticWeightedFTS],
from pyFTS.models import pwfts, song, ifts, hofts from pyFTS.models.ensemble import ensemble ''' model = knn.KNearestNeighbors(order=3) #model = ensemble.AllMethodEnsembleFTS("", partitioner=partitioner) #model = arima.ARIMA("", order=(2,0,2)) #model = quantreg.QuantileRegression("", order=2, dist=True) #model.append_transformation(tdiff) model.fit(dataset[:800]) print(Measures.get_distribution_statistics(dataset[800:1000], model)) #tmp = model.predict(dataset[800:1000], type='distribution') #for tmp2 in tmp: # print(tmp2) #''' ''' bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2, methods=[hofts.HighOrderFTS], #[pwfts.ProbabilisticWeightedFTS], benchmark_models=False, transformations=[None], orders=[1, 2, 3], partitions=np.arange(30, 80, 5), progress=False, type="point", #steps_ahead=[1,2,4,6,8,10], distributed=True, nodes=['192.168.0.110', '192.168.0.107', '192.168.0.106'], file="benchmarks.db", dataset="NASDAQ", tag="comparisons") bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2,