gocrane / crane

Crane is a FinOps Platform for Cloud Resource Analytics and Economics in Kubernetes clusters. The goal is not only to help users to manage cloud cost easier but also ensure the quality of applications.
https://gocrane.io
Apache License 2.0
1.88k stars 384 forks source link

关于 dsp 预测准确度的疑问 #787

Open zou2699 opened 1 year ago

zou2699 commented 1 year ago

Describe the bug 关于 dsp 预测准确度的疑问 目前看dsp主要是利用傅里叶变换和自相关函数寻找时间序列的周期,且周期需为天或者周,不停的重复最后一个周期的数据,来达到预测的效果。 下图是使用cpu的7天使用率进行预测,在实际运用中,最后一个周期数据可能会导致局部时间段内的数据差距很大,预测的效果甚微。

Screenshots image-1

局部时间段 image-2

qmhu commented 1 year ago

@zou2699 Would you please explain more about your chart like which line is what metric.

zou2699 commented 1 year ago

@zou2699 Would you please explain more about your chart like which line is what metric.

the red line is actual cpu usage time series, and the yellow line is predicated cpu time series

qmhu commented 1 year ago

算法首先会计算周期是天,还是周,然后会对上一个周期进行FFT和IFFT,得到下一个周期的数据,因此如果周期是周时,就不会出现你提的问题。所以你可以用debug方法看下你的数据预测的周期是什么。 https://gocrane.io/docs/core-concept/timeseriees-forecasting-by-dsp/