时间序列预测
Suiiiii
这个作者很懒,什么都没留下…
展开
-
Python中的迪基-福勒检验
from random import seedfrom random import randomfrom statsmodels.tsa.stattools import adfullerseed(1)random_walk = list()random_walk.append(-1 if random() < 0.5 else 1)for i in range(1,1000):...翻译 2020-03-20 23:53:55 · 1004 阅读 · 0 评论 -
指数型统计图特点及优化
from matplotlib import pyplotfrom numpy import sqrtseries = [i**2 for i in range(1, 100)]pyplot.figure(1)pyplot.subplot(211)transform = series = sqrt(series)pyplot.plot(transform)pyplot.subplo...翻译 2020-03-01 20:50:57 · 944 阅读 · 0 评论 -
matplotlib.pyplot中figure、subplot、plot、hist的相关用法
from matplotlib import pyplotseries = [i**2 for i in range(1, 100)]pyplot.figure(1)pyplot.subplot(211)pyplot.plot(series)pyplot.subplot(212)pyplot.hist(series)pyplot.show()先解释figure的文档matp...原创 2020-03-01 16:55:28 · 1418 阅读 · 0 评论 -
pandas.interpolate中spline(三次样条插值法)的用法
from pandas import read_csvfrom pandas import datetimefrom matplotlib import pyplotnum_of_order = 3def parser(x): return datetime.strptime('190'+x, '%Y-%m')series = read_csv('shampoo.csv',h...原创 2020-03-01 14:06:16 · 9775 阅读 · 1 评论 -
pandas中read_csv、rolling、expanding用法
import pandas as pdfrom pandas import DataFrameseries = pd.read_csv('daily-min-temperatures.csv',header=0, index_col=0, parse_dates=True,squeeze=True)temps = DataFrame(series....转载 2020-02-17 11:53:57 · 735 阅读 · 0 评论 -
pandas中groupby的用法
源代码import pandas as pdfrom matplotlib import pyplotseries = pd.read_csv('daily-min-temperatures.csv',header=0, index_col=0, parse_dates=True,squeeze=True)groups = series.grou...原创 2020-02-26 15:01:32 · 491 阅读 · 0 评论