fitzgerald0 / time_series_data_mining Goto Github PK
View Code? Open in Web Editor NEWTensorFlow Probability;Time series model
TensorFlow Probability;Time series model
时间序列聚类算法。
直接下载的完整code,运行ts_shape.py报了以下错误:
Empty DataFrame
Columns: [item_id, qty, date]
Index: []
min time is : nan,max time is : nan
Traceback (most recent call last):
File "D:\09idm+google\Compressed\time_series_data_mining-master\ts_shape.py", line 154, in
fin_cluster = main()
File "D:\09idm+google\Compressed\time_series_data_mining-master\ts_shape.py", line 135, in main
input_df, multi_id = pcts.read_data()
File "D:\09idm+google\Compressed\time_series_data_mining-master\ts_shape.py", line 58, in read_data
data = self.fill_na_ts()
File "D:\09idm+google\Compressed\time_series_data_mining-master\ts_shape.py", line 39, in fill_na_ts
time_index = pd.date_range(min_ds, max_ds, freq='D')
File "C:\Python\Python310\lib\site-packages\pandas\core\indexes\datetimes.py", line 945, in date_range
dtarr = DatetimeArray._generate_range(
File "C:\Python\Python310\lib\site-packages\pandas\core\arrays\datetimes.py", line 407, in _generate_range
raise ValueError("Neither start
nor end
can be NaT")
ValueError: Neither start
nor end
can be NaT
进程已结束,退出代码1
sale_df.csv 文件内容如下:
date,item_id,qty
,,mean
01.03.2013,30,399.0
01.04.2013,30,399.0
02.03.2013,30,399.0
02.03.2014,30,169.0
03.03.2013,30,399.0
05.03.2013,30,399.0
07.03.2013,30,399.0
不知道,,mean 是什么意思,不管删不删除,程序都无法运行。
博主,这里为啥是dtw呀,k-shape不是用的SBD吗
def shape_score(self,data,labels,metric='dtw'):
"""
:param df:
:param labels:
:param metric:
:return:
"""
score=silhouette_score(data,labels,metric)
return score
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.