Shampoo Sales Dataset/洗发水销售数据集
This dataset describes the monthly number of sales of shampoo over a 3-year period.
这个数据集描述了三年期间每月的洗发水销售数字
The units are a sales count and there are 36 observations. The original dataset is credited to Makridakis, Wheelwright, and Hyndman (1998).
这些单位是销售数量,有36个观测值。 原始数据集归功于Makridakis,Wheelwright和Hyndman(1998)。
You can download and learn more about the dataset here.(连接半天打不开,这句话就不关联超链接了,下载地址可以到我这个帖子里找:https://blog.csdn.net/dreamscape9999/article/details/80634644)
The example below loads and creates a plot of the loaded dataset.
下面的例子加载和建立一个加载数据集的图
# load and plot dataset from pandas import read_csv from pandas import datetime from matplotlib import pyplot # load dataset def parser(x): return datetime.strptime('190'+x, '%Y-%m') series = read_csv('shampoo-sales.csv', header=0, parse_dates=[0], index_col=0, squeeze=True, date_parser=parser) # summarize first few rows print(series.head()) # line plot series.plot() pyplot.show()
Running the example loads the dataset as a Pandas Series and prints the first 5 rows.
运行该示例将数据集加载为Pandas序列并打印前5行。
1
2
3
4
5
6
7
|
Month
1901-01-01 266.0
1901-02-01 145.9
1901-03-01 183.1
1901-04-01 119.3
1901-05-01 180.3
Name: Sales, dtype: float64
|
A line plot of the series is then created showing a clear increasing trend.
然后创建该系列的线图,显示明显增加的趋势。
Next, we will take a look at the model configuration and test harness used in the experiment
接下来,我们将看看模型配置和实验中用到的测试工具
(和前面那个单步预测一样的,算是复习吧)