pyFTSex/test.py

11 lines
317 B
Python
Raw Normal View History

2022-06-08 23:00:20 +04:00
from pyFTS.models import chen
from pyFTS.partitioners import Grid, Entropy, Util as pUtil
from pyFTS.data import Bitcoin
train = Bitcoin.get_data()
fs = Grid.GridPartitioner(data=train, npart=50)
model = chen.ConventionalFTS(partitioner=fs)
model.fit(train[:-10])
print(model)
forecasts = model.predict(train[-10:])