pyFTSex/test.py

22 lines
430 B
Python
Raw Permalink Normal View History

2024-08-15 12:15:32 +04:00
from service.api.generate import generate_sine_series
import matplotlib.pylab as plt
import warnings
warnings.filterwarnings('ignore')
df = generate_sine_series(length=500, frequency=50, amplitude=100)
plt.plot(df)
data = df.values
from pyFTS.partitioners import CMeans
fs = CMeans.CMeansPartitioner(data=data,npart=10)
fig, ax = plt.subplots(nrows=1, ncols=1, figsize=[15,5])
fs.plot(ax)
plt.show()