├── .gitignore ├── Gray_model ├── data.xlsx ├── graymodel.ipynb └── 折线图.png ├── LICENSE ├── README.md ├── Single_exponential_smoothing ├── input.xlsx ├── main.py ├── out.xls └── requirements.txt ├── exponential_smoothing ├── exponential_smoothing.ipynb ├── requirements.txt ├── 折线图.png ├── 指数平滑预测.xls └── 散点图.png └── weighted_moving_forecasting_method ├── input.xlsx ├── main.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /Gray_model/data.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/Gray_model/data.xlsx -------------------------------------------------------------------------------- /Gray_model/graymodel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import matplotlib.pyplot as plt\n", 11 | "import matplotlib as mpl\n", 12 | "import xlrd\n", 13 | "import pandas as pd\n", 14 | "mpl.rcParams['font.sans-serif'] = ['KaiTi']\n", 15 | "mpl.rcParams['font.serif'] = ['KaiTi']" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "execution_count": 2, 21 | "metadata": {}, 22 | "outputs": [], 23 | "source": [ 24 | "def get_data(Path):\n", 25 | " '''\n", 26 | " 获取数据\n", 27 | " :param Path: 文件的路径及文件名\n", 28 | " :return: 返回平均绝对误差最小的平滑系数和最小平均绝对误差\n", 29 | " '''\n", 30 | " book = xlrd.open_workbook(Path) #打开excel\n", 31 | " sheet = book.sheet_by_index(0) #根据sheet页名字获取sheet\n", 32 | " data_col = sheet.ncols #获取excel里面有多少列\n", 33 | " data_row = sheet.nrows #获取excel里面有多少行\n", 34 | " time = []\n", 35 | " actual_values = []\n", 36 | " factor_names = []\n", 37 | " factor_values = []\n", 38 | " for i in range(1,data_row):\n", 39 | " time.append(int(sheet.col_values(0)[i]))\n", 40 | " actual_values.append(sheet.col_values(1)[i])\n", 41 | " actual_name = sheet.col_values(1)[0]\n", 42 | "\n", 43 | " if data_col >= 3:\n", 44 | " for i in range(2,data_col):\n", 45 | " factor = []\n", 46 | " for j in range(1,data_row):\n", 47 | " factor.append(sheet.col_values(i)[j])\n", 48 | " factor_values.append(factor)\n", 49 | " factor_names.append(sheet.col_values(i)[0])\n", 50 | "\n", 51 | " return time, actual_name, actual_values, factor_names, factor_values" 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": 3, 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "def chart(name, data, F, t):\n", 61 | " '''\n", 62 | " 绘制散点图\n", 63 | " :param name: 变量名:str\n", 64 | " :param data: 原始类型:list\n", 65 | " :param F: 预测序列:list\n", 66 | " :param t: 时间类型:list\n", 67 | " '''\n", 68 | " print(\"----\"*10+'比较分析图'+\"----\"*10)\n", 69 | " F = F\n", 70 | " data = data\n", 71 | " t = t\n", 72 | " plt.title(\"预测比较图\",fontsize=20) #图表名称\n", 73 | " plt.xlabel(\"年份\", fontsize=12) #改x坐标轴标题\n", 74 | " plt.ylabel(name, fontsize=12) #改y坐标轴标题\n", 75 | " plt.scatter(t, data, label='实际值',s=10)\n", 76 | " plt.scatter(t, F, marker = 'x', label='预测值',s=10)\n", 77 | " plt.plot(t, data)\n", 78 | " plt.plot(t, F)\n", 79 | " plt.legend()\n", 80 | " plt.savefig('折线图.png', bbox_inches='tight',dpi = 300)\n", 81 | " plt.show()" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 4, 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "def examine(x0,f0):\n", 91 | " '''\n", 92 | " GM(1,1)灰色模型检验\n", 93 | " :param x0: 原始序列:list\n", 94 | " :param f0: 时间序列:list\n", 95 | " :return: \n", 96 | " '''\n", 97 | " print(\"----\"*10+'模型检验'+\"----\"*10)\n", 98 | " delta = x0 - f0 # 残差序列\n", 99 | " print(\"残差序列为\")\n", 100 | " print(delta)\n", 101 | " C = delta.std()/x0.std() # 后验比差值,np.std()标准差,np.var()方差\n", 102 | " P = 1.0*(np.abs(delta - delta.mean()) < 0.6745*x0.std()).sum()/len(x0)\n", 103 | " print(\"后验比差值C=\", C, \"小残差概率P=\", P)\n", 104 | " if (C < 0.35 and P > 0.95): # 评测后验差判别\n", 105 | " print('该模型精度为---好')\n", 106 | " elif (C < 0.5 and P > 0.8):\n", 107 | " print('该模型精度为---合格')\n", 108 | " elif (C < 0.65 and P > 0.7):\n", 109 | " print('该模型精度为---勉强合格')\n", 110 | " else:\n", 111 | " print('该模型精度为--不合格')" 112 | ] 113 | }, 114 | { 115 | "cell_type": "code", 116 | "execution_count": 5, 117 | "metadata": {}, 118 | "outputs": [], 119 | "source": [ 120 | "def gm11(name,data,time,k=5):\n", 121 | " '''\n", 122 | " GM(1,1)灰色模型建模\n", 123 | " :param name: 变量名:str\n", 124 | " :param data: 原始序列:list\n", 125 | " :param data: 时间序列:list\n", 126 | " :param n: 预测期数:num\n", 127 | " :return: 返回平均绝对误差最小的平滑系数和最小平均绝对误差\n", 128 | " '''\n", 129 | " n = len(data)\n", 130 | " x0 = np.array(data)\n", 131 | " print(\"----\"*10+'数据处理'+\"----\"*10)\n", 132 | " print(\"初始序列为\")\n", 133 | " print(x0)\n", 134 | "\n", 135 | " x1 = x0.cumsum() #1-AGO序列\n", 136 | " print(\"累加序列为\")\n", 137 | " print(x1)\n", 138 | " \n", 139 | " z1 = (x1[:len(x1)-1] + x1[1:])/2.0 #紧邻均值(MEAN)生成序列\n", 140 | " print(\"紧邻均值生成序列为\")\n", 141 | " print(z1)\n", 142 | "\n", 143 | " print(\"----\"*10+'构建矩阵B和Yn'+\"----\"*9)\n", 144 | " z1 = z1.reshape((len(z1),1))\n", 145 | " B = np.append(-z1, np.ones_like(z1), axis = 1)\n", 146 | " print(\"数据矩阵B为\")\n", 147 | " print(B)\n", 148 | " \n", 149 | " Yn = x0[1:].reshape((len(x0)-1, 1))\n", 150 | " print(\"数据矩阵Yn为\")\n", 151 | " print(Yn)\n", 152 | " \n", 153 | " print(\"----\"*10+'求解参数'+\"----\"*10)\n", 154 | " [[a],[b]] = np.dot(np.dot(np.linalg.inv(np.dot(B.T, B)), B.T), Yn) #计算参数\n", 155 | " print(\"待估参数向量为\")\n", 156 | " print([[a],[b]])\n", 157 | " print(\"即a=\", a,\", b=\", b)\n", 158 | " \n", 159 | " print(\"----\"*10+'预测模型'+\"----\"*10)\n", 160 | " print(\"预测模型为: f(k+1)=\", x0[0]-b/a, \"×(1-e^{})×e^{}k\".format(a,-a))\n", 161 | " \n", 162 | " f0 = np.zeros(n)\n", 163 | " for i in range(n):\n", 164 | " f0[i] = (x0[0] - b/a)*(1-np.exp(a))*np.exp(-a*(i))\n", 165 | " print(\"预测序列为\")\n", 166 | " print(f0)\n", 167 | " \n", 168 | " examine(x0,f0)\n", 169 | " chart(name, x0, f0, time)\n", 170 | " \n", 171 | " print(\"----\"*10+'预测结果'+\"----\"*10)\n", 172 | " f1 = np.zeros(k)\n", 173 | " for i in range(n, n+k):\n", 174 | " f1[i-n] = (x0[0] - b/a)*(1-np.exp(a))*np.exp(-a*(i))\n", 175 | " print(\"利用模型向后预测{}期,预测结果为\".format(k))\n", 176 | " print(f1)" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": 6, 182 | "metadata": {}, 183 | "outputs": [], 184 | "source": [ 185 | "def GRA(x, y, x_name, y_name,rho=0.5):\n", 186 | " #\n", 187 | " '''\n", 188 | " GM(1,1)灰色模型建模\n", 189 | " :param x: 原始序列:list\n", 190 | " :param y: 对比序列:list\n", 191 | " :param x_name: 变量名:str\n", 192 | " :param y_name: 变量名:str\n", 193 | " :param rho: 分辨系数,一般取0.5\n", 194 | " :return: 返回灰色关联度\n", 195 | " '''\n", 196 | " data = []\n", 197 | " data.append(x)\n", 198 | " for i in y:\n", 199 | " data.append(i)\n", 200 | " data = pd.DataFrame(data)\n", 201 | " data = data.iloc[:,0:]\n", 202 | "\n", 203 | " # 1、数据均值化处理\n", 204 | " data_mean=data.mean(axis=1)\n", 205 | " for i in range(data.index.size):\n", 206 | " data.iloc[i,:] = data.iloc[i,:]/data_mean[i]\n", 207 | " \n", 208 | " # 2、提取参考队列和比较队列\n", 209 | " reference=data.iloc[0,:]\n", 210 | " contrast=data.iloc[1:,:]\n", 211 | " \n", 212 | " # 比较队列与参考队列相减\n", 213 | " t=pd.DataFrame()\n", 214 | " for j in range(contrast.index.size):\n", 215 | " temp=pd.Series(contrast.iloc[j,:]-reference)\n", 216 | " t=t.append(temp,ignore_index=True)\n", 217 | " \n", 218 | " #求最大差和最小差\n", 219 | " mmax=t.abs().max().max()\n", 220 | " mmin=t.abs().min().min()\n", 221 | " rho=0.5 #分辨系数,一般取0.5\n", 222 | " \n", 223 | " #3、求关联系数\n", 224 | " ksi=((mmin+rho*mmax)/(abs(t)+rho*mmax))\n", 225 | " \n", 226 | " #4、求关联度\n", 227 | " r=ksi.sum(axis=1)/ksi.columns.size\n", 228 | " \n", 229 | " print(\"----\"*9+'灰色关联度分析'+\"----\"*10)\n", 230 | " for i in range(len(y_name)):\n", 231 | " print(y_name[i],\"与{}之间的的灰色关联度为\".format(x_name),r[i])\n", 232 | " return r\n" 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": 7, 238 | "metadata": {}, 239 | "outputs": [ 240 | { 241 | "name": "stdout", 242 | "output_type": "stream", 243 | "text": [ 244 | "------------------------------------灰色关联度分析----------------------------------------\n", 245 | "社会消费品零售总额(亿元) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.8321287314290979\n", 246 | "地区生产总值(亿元) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.8816149447327358\n", 247 | "茶叶产量(万吨) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.6321091840714352\n", 248 | "生物医药销售产值(亿元) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.7003587717954797\n", 249 | "纺织鞋服销售产值(亿元) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.8492667754172439\n", 250 | "工业增加值(亿元) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.7721964618533301\n", 251 | "常住人口(万人) 与晋江机场货邮吞吐量(吨)之间的的灰色关联度为 0.5431643372032279\n", 252 | "----------------------------------------数据处理----------------------------------------\n", 253 | "初始序列为\n", 254 | "[22938. 31227. 35711. 38772. 41233. 43033.32 49683.37 59277.79\n", 255 | " 63845.42 75294.59]\n", 256 | "累加序列为\n", 257 | "[ 22938. 54165. 89876. 128648. 169881. 212914.32 262597.69\n", 258 | " 321875.48 385720.9 461015.49]\n", 259 | "紧邻均值生成序列为\n", 260 | "[ 38551.5 72020.5 109262. 149264.5 191397.66 237756.005\n", 261 | " 292236.585 353798.19 423368.195]\n", 262 | "----------------------------------------构建矩阵B和Yn------------------------------------\n", 263 | "数据矩阵B为\n", 264 | "[[-3.85515000e+04 1.00000000e+00]\n", 265 | " [-7.20205000e+04 1.00000000e+00]\n", 266 | " [-1.09262000e+05 1.00000000e+00]\n", 267 | " [-1.49264500e+05 1.00000000e+00]\n", 268 | " [-1.91397660e+05 1.00000000e+00]\n", 269 | " [-2.37756005e+05 1.00000000e+00]\n", 270 | " [-2.92236585e+05 1.00000000e+00]\n", 271 | " [-3.53798190e+05 1.00000000e+00]\n", 272 | " [-4.23368195e+05 1.00000000e+00]]\n", 273 | "数据矩阵Yn为\n", 274 | "[[31227. ]\n", 275 | " [35711. ]\n", 276 | " [38772. ]\n", 277 | " [41233. ]\n", 278 | " [43033.32]\n", 279 | " [49683.37]\n", 280 | " [59277.79]\n", 281 | " [63845.42]\n", 282 | " [75294.59]]\n", 283 | "----------------------------------------求解参数----------------------------------------\n", 284 | "待估参数向量为\n", 285 | "[[-0.1107571536567451], [25691.258137221797]]\n", 286 | "即a= -0.1107571536567451 , b= 25691.258137221797\n", 287 | "----------------------------------------预测模型----------------------------------------\n", 288 | "预测模型为: f(k+1)= 254898.25980266064 ×(1-e^-0.1107571536567451)×e^0.1107571536567451k\n", 289 | "预测序列为\n", 290 | "[26724.52564137 29854.59787944 33351.27539789 37257.49632125\n", 291 | " 41621.22784114 46496.05523858 51941.83989479 58025.45437054\n", 292 | " 64821.6035806 72413.74214717]\n", 293 | "----------------------------------------模型检验----------------------------------------\n", 294 | "残差序列为\n", 295 | "[-3786.52564137 1372.40212056 2359.72460211 1514.50367875\n", 296 | " -388.22784114 -3462.73523858 -2258.46989479 1252.33562946\n", 297 | " -976.1835806 2880.84785283]\n", 298 | "后验比差值C= 0.1500509397018266 小残差概率P= 1.0\n", 299 | "该模型精度为---好\n", 300 | "----------------------------------------比较分析图----------------------------------------\n" 301 | ] 302 | }, 303 | { 304 | "data": { 305 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAEbCAYAAADJWrOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzdd3iUVfbA8e9JgQRCCIQA0qsg0g1FBUUFBbuIBdvqomJBV1fX7voT17a6FlRUBOxIUyygCKhAFJHeW+iElkZJSE/O7487gQCBTMqQdj7Pw0Pmzvu+cybinHlvOVdUFWOMMaYgfqUdgDHGmPLBEoYxxhivWMIwxhjjFUsYxhhjvGIJwxhjjFcsYRhjjPGKJQxjikBEQkTkbhGpfopfd4yInHMKX6+JiPQUEf9T9Zqm7LKEYSoVEakhIlLIcxoce46qJgNPAp8V8lqXichMETm/MOfl0Q14JJ/r3igi6SIyyss4motIYxEJEpEwEWkjIv08SfA1EflGROYBfwDzgCUi0qyIMZsKIqC0AzCmOESkDtALGAJ0Bh5S1a89z4UAXYDuQA/PnzDgBeD1Y65zK3CX508QcDmQA5wG3ABsFJELVDUjz2nLga2FDHkeMNVz3pxCngvQALj32EZVHS8i8cCTIhKoqpkFXKc18DMwDtgE7AIGAO8B3wFxqpoDICJXA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g1JENSTrCn0FtAIXE/yR1srMBJYC7xDspTGLJI1iN4CdkbE3sw3wiyPA8Osl+TWGZpFsixGLXAm8BJwFXAvyaJz7wGDSFb3FcnhqluAB0jWYLqRJDhGAOdExHez3Qqzzg0qdwFmVeQwyVLWmyNi34knJU0GHo6IlvwJkj4O7MuN3ydpAfAosAjYkE3ZZun4HIZZL4mIloj4Y/uwyHm3UFjkjCU5DIWk64CfRrLi7UXAM6Wr1qz7HBhmpXewi6+NAw7kLvB7E9gr6fskIXM0i+LM0vIhKbPS293F19YDNQAnFq+TNBz4TgZ1mXWLT3qblZikYbmP2ppVNAeGmZml4nMYZmaWigPDzMxScWCYmVkqDgwzM0vFgWFmZqk4MMzMLJX/AVJ2JOC86ExaAAAAAElFTkSuQmCC\n", 306 | "text/plain": [ 307 | "
" 308 | ] 309 | }, 310 | "metadata": { 311 | "needs_background": "light" 312 | }, 313 | "output_type": "display_data" 314 | }, 315 | { 316 | "name": "stdout", 317 | "output_type": "stream", 318 | "text": [ 319 | "----------------------------------------预测结果----------------------------------------\n", 320 | "利用模型向后预测5期,预测结果为\n", 321 | "[ 80895.09919693 90369.82318607 100954.26081128 112778.38571143\n", 322 | " 125987.39450385]\n" 323 | ] 324 | } 325 | ], 326 | "source": [ 327 | "time, actual_name, actual_values, factor_names, factor_values = get_data('data.xlsx')\n", 328 | "GRA(actual_values,factor_values, actual_name, factor_names)\n", 329 | "gm11(actual_name,actual_values,time)" 330 | ] 331 | }, 332 | { 333 | "cell_type": "code", 334 | "execution_count": null, 335 | "metadata": {}, 336 | "outputs": [], 337 | "source": [] 338 | } 339 | ], 340 | "metadata": { 341 | "kernelspec": { 342 | "display_name": "Python 3", 343 | "language": "python", 344 | "name": "python3" 345 | }, 346 | "language_info": { 347 | "codemirror_mode": { 348 | "name": "ipython", 349 | "version": 3 350 | }, 351 | "file_extension": ".py", 352 | "mimetype": "text/x-python", 353 | "name": "python", 354 | "nbconvert_exporter": "python", 355 | "pygments_lexer": "ipython3", 356 | "version": "3.8.2" 357 | } 358 | }, 359 | "nbformat": 4, 360 | "nbformat_minor": 4 361 | } 362 | -------------------------------------------------------------------------------- /Gray_model/折线图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/Gray_model/折线图.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weighted_moving_forecasting_method 2 | weighted moving forecasting method by python 3 | 加权滑动预测法是时间序列平滑预测模型之一,通过对各个时期的历史数据赋予不同的权值,来反映对将要发生的数据所起的作用。一般来说,距预测期较劲的数据,对预测值的影响也较大,因而其权值也较大;据预测期较远的数据,对预测值的影响也较小。 4 | 5 | 使用方法:下载文件,确保input.xlsx和mian.py在同一个文件夹,将数据导入到input.xlsx,pip install requirements.txt安装依赖,运行mian.py文件 6 | # Single_exponential_smoothing 7 | Single exponential smoothing by python 8 | 一次指数平滑法(single exponential smoothing),也称为单一指数平滑法,是指以最后的一个第一次指数平滑。它只有一个平滑系数,而且当观察值离预测时期越久远时,权数变得越小。一次指数平滑是以一段时期的预测值与观察值的线性组合作为t+1期的预测值。 9 | 10 | 使用方法:下载文件,确保input.xlsx和mian.py在同一个文件夹,将数据导入到input.xlsx,pip install requirements.txt安装依赖,运行mian.py文件 11 | 12 | # exponential_smoothing 13 | Double exponential smoothing and Triple exponential smoothing by python 14 | 具体使用方法参照ipynb文件。 15 | 16 | # Gray_model 17 | 灰色y预测模型 18 | -------------------------------------------------------------------------------- /Single_exponential_smoothing/input.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/Single_exponential_smoothing/input.xlsx -------------------------------------------------------------------------------- /Single_exponential_smoothing/main.py: -------------------------------------------------------------------------------- 1 | import xlrd,xlwt 2 | 3 | def printIntro(): 4 | print("这个程序可用于一次指数平滑法") 5 | print("请将相关数据填写到input.xlsx") 6 | print('''请注意:平滑系数填写在第一行; 7 | 重新运行文件请关闭excel的文件,防止文件被其他应用占用。''') 8 | input("请输入任意字符继续") 9 | print("-" * 30) 10 | 11 | def datainput(): #导入数据 12 | path = 'input.xlsx' 13 | rb = xlrd.open_workbook(path) 14 | data_sheet = rb.sheets()[0] 15 | rowNum = data_sheet.nrows 16 | m = rowNum - 1 #m为数据的个数 17 | s = [] 18 | for i in range(1, rowNum): 19 | s.append(data_sheet.cell_value(i, 0)) 20 | alpha = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9] 21 | print("数据导入成功") 22 | print("导入的实际值为:",s) 23 | print("平滑系数为:", alpha) 24 | print("正在进行的指数滑动预测计算...") 25 | print("-"*30) 26 | return alpha, s, m 27 | 28 | def exponential_smoothing(alpha, s, m): 29 | result = [] 30 | for j in range(9): 31 | s_temp = [0 for i in range(m)] 32 | s_temp[0] = s[0] 33 | SI = alpha[j] 34 | for i in range(1, m): 35 | x = SI * s[i] + (1 - SI) * s_temp[i-1] 36 | s_temp[i] = round(x, 3) 37 | result.append(s_temp) 38 | #print(result) 39 | return result 40 | 41 | def difference_value(result, m, s): 42 | d_result = [] 43 | for j in range(9): 44 | d_value = [0 for i in range(m)] 45 | for i in range(m -1): #求绝对误差值 46 | y = abs(s[i+1]-result[j][i]) 47 | d_value[i] = round(y, 3) 48 | d_result.append(d_value) 49 | #print(d_result) 50 | sum = [] 51 | for j in range(9): 52 | z = 0 53 | for i in range(m-1): #求平均绝对误差值 54 | z +=d_result[j][i] 55 | sum.append(z) 56 | average = [] 57 | for j in range(9): 58 | w = round((sum[j]/(m-1)), 4) 59 | average.append(w) 60 | #print(average) 61 | return d_result, average 62 | 63 | def set_style(name, height, bold=False): 64 | style = xlwt.XFStyle() # 初始化样式 65 | font = xlwt.Font() # 为样式创建字体 66 | font.name = name 67 | font.bold = bold 68 | font.color_index = 4 69 | font.height = height 70 | style.font = font 71 | return style 72 | 73 | def write_excel(result, d_result, average, m, s): #写入文件 74 | f = xlwt.Workbook() 75 | sheet1 = f.add_sheet(u'sheet1', cell_overwrite_ok=True) 76 | row1 = [u'时间', u'实际值', u'预测值', u'绝对误差'] 77 | for i in range(0, len(row1)): 78 | sheet1.write(0, i, row1[i], set_style('Times New Roman', 220, True)) 79 | row2 = ['a = 0.1', 'a = 0.2', 'a = 0.3', 'a = 0.4','a = 0.5', 'a = 0.6', 'a = 0.7', 'a = 0.8','a = 0.9'] 80 | for i in range(0, 9): #行,误差序列 81 | sheet1.write(1, 2*i + 2, row2[i], set_style('Times New Roman', 220, True)) 82 | sheet1.write(m + 3, 2*i + 2, '平均绝对误差', set_style('Times New Roman', 220, True)) 83 | sheet1.write(m + 3, 2*i + 3, average[i], set_style('Times New Roman', 220, True)) 84 | for i in range(m + 1): #时间序列 85 | sheet1.write(i + 2, 0, i + 1, set_style('Times New Roman', 220, True)) 86 | for i in range(m): 87 | sheet1.write(i + 2, 1, s[i], set_style('Times New Roman', 220, True)) 88 | for j in range(9): 89 | for i in range(m): 90 | sheet1.write(i + 3, 2 + 2*j, result[j][i], set_style('Times New Roman', 220, True)) 91 | sheet1.write(i + 3, 3 + 2*j, d_result[j][i], set_style('Times New Roman', 220, True)) 92 | f.save('out.xls') 93 | print("已经将结果写入out.xls") 94 | 95 | def main(): 96 | datainput() 97 | alpha, s, m = datainput() 98 | result = exponential_smoothing(alpha, s, m) 99 | d_result, average = difference_value(result, m, s) 100 | write_excel(result, d_result, average, m, s) 101 | 102 | if __name__ == '__main__': 103 | main() -------------------------------------------------------------------------------- /Single_exponential_smoothing/out.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/Single_exponential_smoothing/out.xls -------------------------------------------------------------------------------- /Single_exponential_smoothing/requirements.txt: -------------------------------------------------------------------------------- 1 | xlrd 2 | xlwt 3 | matplotlib 4 | numpy -------------------------------------------------------------------------------- /exponential_smoothing/exponential_smoothing.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import matplotlib.pyplot as plt\n", 11 | "import matplotlib as mpl\n", 12 | "import xlwt\n", 13 | "mpl.rcParams['font.sans-serif'] = ['KaiTi']\n", 14 | "mpl.rcParams['font.serif'] = ['KaiTi']" 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": 2, 20 | "metadata": {}, 21 | "outputs": [], 22 | "source": [ 23 | "def exponential_smoothing_1(alpha, data):\n", 24 | " '''\n", 25 | " 一次指数平滑\n", 26 | " :param alpha: 平滑系数\n", 27 | " :param data: 数据序列:list\n", 28 | " :return: 返回一次指数平滑值:list\n", 29 | " '''\n", 30 | " s_single=[]\n", 31 | " s_single.append(data[0])\n", 32 | " for i in range(1, len(data)):\n", 33 | " s_single.append(alpha * data[i] + (1 - alpha) * s_single[i-1])\n", 34 | " return s_single" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": 3, 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "def exponential_smoothing_2(alpha, data):\n", 44 | " '''\n", 45 | " 二次指数平滑\n", 46 | " :param alpha: 平滑系数\n", 47 | " :param data: 数据序列:list\n", 48 | " :return: 返回二次指数平滑值,参数a, b:list\n", 49 | " '''\n", 50 | " s_single = exponential_smoothing_1(alpha, data)\n", 51 | " s_double = exponential_smoothing_1(alpha, s_single)\n", 52 | " a_double = [0 for i in range(len(data))]\n", 53 | " b_double = [0 for i in range(len(data))]\n", 54 | " F_double = [0 for i in range(len(data))]\n", 55 | " for i in range(len(data)):\n", 56 | " a = 2 * s_single[i] - s_double[i]\n", 57 | " b = (alpha / (1 - alpha)) * (s_single[i] - s_double[i])\n", 58 | " F = a + b\n", 59 | " a_double[i] = a\n", 60 | " b_double[i] = b\n", 61 | " F_double[i] = F\n", 62 | " return a_double,b_double,F_double" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": 4, 68 | "metadata": {}, 69 | "outputs": [], 70 | "source": [ 71 | "def exponential_smoothing_3(alpha, data):\n", 72 | " '''\n", 73 | " 三次指数平滑\n", 74 | " :param alpha: 平滑系数\n", 75 | " :param data: 数据序列:list\n", 76 | " :return: 返回二次指数平滑值,参数a, b, c,预测值Ft+1:list\n", 77 | " '''\n", 78 | " s_single = exponential_smoothing_1(alpha, data)\n", 79 | " s_double = exponential_smoothing_1(alpha, s_single)\n", 80 | " s_triple = exponential_smoothing_1(alpha, s_double)\n", 81 | " \n", 82 | " a_triple = [0 for i in range(len(data))]\n", 83 | " b_triple = [0 for i in range(len(data))]\n", 84 | " c_triple = [0 for i in range(len(data))]\n", 85 | " F_triple = [0 for i in range(len(data))]\n", 86 | " for i in range(len(data)):\n", 87 | " a = 3 * s_single[i] - 3 * s_double[i] + s_triple[i]\n", 88 | " b = (alpha / (2 * ((1 - alpha) ** 2))) * ((6 - 5 * alpha) * s_single[i] - 2 * ((5 - 4 * alpha) * s_double[i]) + (4 - 3 * alpha) * s_triple[i])\n", 89 | " c = ((alpha ** 2) / (2 * ((1 - alpha) ** 2))) * (s_single[i] - 2 * s_double[i] + s_triple[i])\n", 90 | " F = a + b + c\n", 91 | " a_triple[i] = a\n", 92 | " b_triple[i] = b\n", 93 | " c_triple[i] = c\n", 94 | " F_triple[i] = F\n", 95 | " return a_triple, b_triple, c_triple, F_triple" 96 | ] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "execution_count": 5, 101 | "metadata": {}, 102 | "outputs": [], 103 | "source": [ 104 | "def model_error_analysis(F, data):\n", 105 | " '''\n", 106 | " 误差分析\n", 107 | " :param F: 预测数列:list\n", 108 | " :param data: 原始序列:list\n", 109 | " :return: 返回各期绝对误差,相对误差:list,返回平均绝对误差和平均相对误差\n", 110 | " '''\n", 111 | " AE = [0 for i in range(len(data)-1)]\n", 112 | " RE = []\n", 113 | " AE_num = 0\n", 114 | " RE_num = 0\n", 115 | " for i in range(1,len(data)):\n", 116 | " _AE = abs(F[i-1] - data[i])\n", 117 | " _RE = _AE / data[i]\n", 118 | " AE_num += _AE\n", 119 | " RE_num += _RE\n", 120 | " AE[i-1] = _AE\n", 121 | " RE.append('{:.2f}%'.format(_RE*100))\n", 122 | " MAE = AE_num / (len(data)-1)\n", 123 | " MRE = '{:.2f}%'.format(RE_num *100 / (len(data)-1))\n", 124 | " return AE, MAE, RE, MRE" 125 | ] 126 | }, 127 | { 128 | "cell_type": "code", 129 | "execution_count": 6, 130 | "metadata": {}, 131 | "outputs": [], 132 | "source": [ 133 | "def alpha_analysis(data,itype=2):\n", 134 | " '''\n", 135 | " 判断误差最小的平滑系数\n", 136 | " :param data: 原始序列:list\n", 137 | " :param itype: 平滑类型:1,2,3\n", 138 | " :return: 返回平均绝对误差最小的平滑系数和最小平均绝对误差\n", 139 | " '''\n", 140 | " alpha_all = [0.01 * i for i in range(1,100)] #只需要0.1-0.9修改为alpha_triple = [0.1 * i for i in range(1,10)]\n", 141 | " best_alpha = 0\n", 142 | " min_MAE = float('Inf') # 无穷大\n", 143 | " if itype == 2:\n", 144 | " for i in range(len(alpha_all)):\n", 145 | " alpha = alpha_all[i]\n", 146 | " a_double,b_double,F_double = exponential_smoothing_2(alpha, data)\n", 147 | " AE_double, MAE_double, RE_double, MRE_double = model_error_analysis(F_double, data)\n", 148 | " if MAE_double <= min_MAE:\n", 149 | " min_MAE = MAE_double\n", 150 | " best_alpha = alpha\n", 151 | " else:\n", 152 | " pass\n", 153 | " elif itype == 3:\n", 154 | " for i in range(len(alpha_all)):\n", 155 | " alpha = alpha_all[i]\n", 156 | " a_triple, b_triple, c_triple, F_triple = exponential_smoothing_3(alpha, data)\n", 157 | " AE_triple, MAE_triple, RE_triple, MRE_triple = model_error_analysis(F_triple, data)\n", 158 | " if MAE_triple <= min_MAE:\n", 159 | " min_MAE = MAE_triple\n", 160 | " best_alpha = alpha\n", 161 | " else:\n", 162 | " pass\n", 163 | " else:\n", 164 | " for i in range(len(alpha_all)):\n", 165 | " alpha = alpha_all[i]\n", 166 | " F_single = exponential_smoothing_1(alpha, data)\n", 167 | " AE_single, MAE_single, RE_single, MRE_single = model_error_analysis(F_single, data)\n", 168 | " if MAE_single <= min_MAE:\n", 169 | " min_MAE = MAE_single\n", 170 | " best_alpha = alpha\n", 171 | " else:\n", 172 | " pass\n", 173 | " \n", 174 | " return best_alpha, min_MAE" 175 | ] 176 | }, 177 | { 178 | "cell_type": "code", 179 | "execution_count": 7, 180 | "metadata": {}, 181 | "outputs": [], 182 | "source": [ 183 | "def scatter_diagram(F, data, t):\n", 184 | " '''\n", 185 | " 绘制散点图\n", 186 | " :param F: 预测序列:list\n", 187 | " :param data: 原始类型:list\n", 188 | " :param t: 时间类型:list\n", 189 | " '''\n", 190 | " F = F[:-1:]\n", 191 | " data = data[1::]\n", 192 | " t = t[1::]\n", 193 | " plt.title(\"散点图\",fontsize=20) #图表名称\n", 194 | " plt.xlabel(\"年份\", fontsize=12) #改x坐标轴标题\n", 195 | " plt.ylabel(\"货邮吞吐量(千吨)\", fontsize=12) #改y坐标轴标题\n", 196 | " plt.scatter(t, data, label='实际值',s=10)\n", 197 | " plt.scatter(t, F, marker = 'x', label='预测值',s=10)\n", 198 | " plt.legend()\n", 199 | " plt.savefig('散点图.png', bbox_inches='tight',dpi = 300)\n", 200 | " plt.show()" 201 | ] 202 | }, 203 | { 204 | "cell_type": "code", 205 | "execution_count": 8, 206 | "metadata": {}, 207 | "outputs": [], 208 | "source": [ 209 | "def line_chart(F, data, t):\n", 210 | " '''\n", 211 | " 绘制折现图\n", 212 | " :param F: 预测序列:list\n", 213 | " :param data: 原始类型:list\n", 214 | " :param t: 时间类型:list\n", 215 | " '''\n", 216 | " F = F[:-1:]\n", 217 | " data = data[1::]\n", 218 | " t = t[1::]\n", 219 | " plt.title(\"对比曲线\",fontsize=20)\n", 220 | " plt.xlabel(\"年份\", fontsize=12)\n", 221 | " plt.ylabel(\"货邮吞吐量(千吨)\", fontsize=12)\n", 222 | " plt.plot(t, data, label='实际值')\n", 223 | " plt.plot(t, F, label='预测值')\n", 224 | " plt.legend()\n", 225 | " plt.savefig('折线图.png', bbox_inches='tight',dpi = 300)\n", 226 | " plt.show()" 227 | ] 228 | }, 229 | { 230 | "cell_type": "code", 231 | "execution_count": 9, 232 | "metadata": {}, 233 | "outputs": [], 234 | "source": [ 235 | "def write_xls(alpha, data, t):\n", 236 | " '''\n", 237 | " 写入表格\n", 238 | " :param alpha: 平滑系数\n", 239 | " :param data: 原始类型:list\n", 240 | " :param t: 时间类型:list\n", 241 | " '''\n", 242 | " workbook = xlwt.Workbook()\n", 243 | " worksheet_1 = workbook.add_sheet('二次指数平滑')\n", 244 | " worksheet_2 = workbook.add_sheet('三次指数平滑')\n", 245 | " \n", 246 | " s_single = exponential_smoothing_1(alpha, data)\n", 247 | " s_double = exponential_smoothing_1(alpha, s_single)\n", 248 | " s_triple = exponential_smoothing_1(alpha, s_double)\n", 249 | " \n", 250 | " a_double,b_double,F_double = exponential_smoothing_2(alpha, data)\n", 251 | " AE_double, MAE_double, RE_double, MRE_double = model_error_analysis(F_double, data)\n", 252 | " title_1 = ['时间', 't', '实际值', '一次指数平滑值', '二次指数平滑值', 'a', 'b', 'F', '绝对误差', '相对误差']\n", 253 | " col = 0\n", 254 | " for w in title_1:\n", 255 | " worksheet_1.write(0,col,w)\n", 256 | " col += 1\n", 257 | " worksheet_1.write(1,0,t[0])\n", 258 | " worksheet_1.write(1,1,1)\n", 259 | " worksheet_1.write(1,2,data[0])\n", 260 | " worksheet_1.write(1,3,s_single[0])\n", 261 | " worksheet_1.write(1,4,s_double[0])\n", 262 | " worksheet_1.write(1,5,a_double[0])\n", 263 | " worksheet_1.write(1,6,b_double[0])\n", 264 | " row = 2\n", 265 | " for i in range(1,len(data)):\n", 266 | " worksheet_1.write(row,0,t[i])\n", 267 | " worksheet_1.write(row,1,i+1)\n", 268 | " worksheet_1.write(row,2,data[i])\n", 269 | " worksheet_1.write(row,3,s_single[i])\n", 270 | " worksheet_1.write(row,4,s_double[i])\n", 271 | " worksheet_1.write(row,5,a_double[i])\n", 272 | " worksheet_1.write(row,6,b_double[i])\n", 273 | " worksheet_1.write(row,7,F_double[i-1])\n", 274 | " worksheet_1.write(row,8,AE_double[i-1])\n", 275 | " worksheet_1.write(row,9,RE_double[i-1])\n", 276 | " row += 1\n", 277 | " worksheet_1.write_merge(row, row, 0, 8, '平均绝对误差')\n", 278 | " worksheet_1.write_merge(row + 1, row + 1, 0, 8, '平均相对误差')\n", 279 | " worksheet_1.write(row,9,MAE_double)\n", 280 | " worksheet_1.write(row + 1,9,MRE_double)\n", 281 | " \n", 282 | " \n", 283 | " a_triple, b_triple, c_triple, F_triple = exponential_smoothing_3(alpha, data)\n", 284 | " AE_triple, MAE_triple, RE_triple, MRE_triple = model_error_analysis(F_triple, data)\n", 285 | " title_2 = ['时间', 't', '实际值', '一次指数平滑值', '二次指数平滑值', '三次指数平滑值', 'a', 'b', 'c', 'F', '绝对误差', '相对误差']\n", 286 | " col = 0\n", 287 | " for w in title_2:\n", 288 | " worksheet_2.write(0,col,w)\n", 289 | " col += 1\n", 290 | " worksheet_2.write(1,0,t[0])\n", 291 | " worksheet_2.write(1,1,1)\n", 292 | " worksheet_2.write(1,2,data[0])\n", 293 | " worksheet_2.write(1,3,s_single[0])\n", 294 | " worksheet_2.write(1,4,s_double[0])\n", 295 | " worksheet_2.write(1,5,s_triple[0])\n", 296 | " worksheet_2.write(1,6,a_triple[0])\n", 297 | " worksheet_2.write(1,7,b_triple[0])\n", 298 | " worksheet_2.write(1,8,c_triple[0])\n", 299 | " row = 2\n", 300 | " for i in range(1,len(data)):\n", 301 | " worksheet_2.write(row,0,t[i])\n", 302 | " worksheet_2.write(row,1,i+1)\n", 303 | " worksheet_2.write(row,2,data[i])\n", 304 | " worksheet_2.write(row,3,s_single[i])\n", 305 | " worksheet_2.write(row,4,s_double[i])\n", 306 | " worksheet_2.write(row,5,s_triple[i])\n", 307 | " worksheet_2.write(row,6,a_triple[i])\n", 308 | " worksheet_2.write(row,7,b_triple[i])\n", 309 | " worksheet_2.write(row,8,c_triple[i])\n", 310 | " worksheet_2.write(row,9,F_triple[i-1])\n", 311 | " worksheet_2.write(row,10,AE_triple[i-1])\n", 312 | " worksheet_2.write(row,11,RE_triple[i-1])\n", 313 | " row += 1\n", 314 | " worksheet_2.write_merge(row, row, 0, 10, '平均绝对误差')\n", 315 | " worksheet_2.write_merge(row + 1, row + 1, 0, 10, '平均相对误差')\n", 316 | " worksheet_2.write(row, 11, MAE_triple)\n", 317 | " worksheet_2.write(row + 1, 11, MRE_triple)\n", 318 | " workbook.save('指数平滑预测.xls')" 319 | ] 320 | }, 321 | { 322 | "cell_type": "markdown", 323 | "metadata": {}, 324 | "source": [ 325 | "## 使用方法\n", 326 | "\n", 327 | "定义数据和时间" 328 | ] 329 | }, 330 | { 331 | "cell_type": "code", 332 | "execution_count": 10, 333 | "metadata": {}, 334 | "outputs": [], 335 | "source": [ 336 | "t = [2010,2011,2012,2013,2014,2015,2016,2017,2018,2019]\n", 337 | "data = [22.938,31.227,35.711,38.772,41.233,43.033,49.683,59.278,63.845,75.295]" 338 | ] 339 | }, 340 | { 341 | "cell_type": "markdown", 342 | "metadata": {}, 343 | "source": [ 344 | "是否寻找平均绝对误差最小的平滑系数
itype取值为1,2,3,分别代表一次、二次、三次指数平滑
返回最优的平滑系数以及最小平均绝对误差" 345 | ] 346 | }, 347 | { 348 | "cell_type": "code", 349 | "execution_count": 11, 350 | "metadata": {}, 351 | "outputs": [ 352 | { 353 | "data": { 354 | "text/plain": [ 355 | "(0.99, 5.86330343864394)" 356 | ] 357 | }, 358 | "execution_count": 11, 359 | "metadata": {}, 360 | "output_type": "execute_result" 361 | } 362 | ], 363 | "source": [ 364 | "alpha_analysis(data,itype=1)" 365 | ] 366 | }, 367 | { 368 | "cell_type": "code", 369 | "execution_count": 12, 370 | "metadata": {}, 371 | "outputs": [ 372 | { 373 | "data": { 374 | "text/plain": [ 375 | "(0.56, 3.3794655525358674)" 376 | ] 377 | }, 378 | "execution_count": 12, 379 | "metadata": {}, 380 | "output_type": "execute_result" 381 | } 382 | ], 383 | "source": [ 384 | "alpha_analysis(data,itype=2)" 385 | ] 386 | }, 387 | { 388 | "cell_type": "code", 389 | "execution_count": 13, 390 | "metadata": {}, 391 | "outputs": [ 392 | { 393 | "data": { 394 | "text/plain": [ 395 | "(0.34, 3.3621142550224645)" 396 | ] 397 | }, 398 | "execution_count": 13, 399 | "metadata": {}, 400 | "output_type": "execute_result" 401 | } 402 | ], 403 | "source": [ 404 | "alpha_analysis(data,itype=3)" 405 | ] 406 | }, 407 | { 408 | "cell_type": "markdown", 409 | "metadata": {}, 410 | "source": [ 411 | "定义平滑系数,分别进行一次,二次,三次指数平滑
分别返回:
一次指数平滑值
二次指数平滑参数a,b及预测值F
三次指数平滑参数a,b,c及预测值F" 412 | ] 413 | }, 414 | { 415 | "cell_type": "code", 416 | "execution_count": 14, 417 | "metadata": {}, 418 | "outputs": [ 419 | { 420 | "data": { 421 | "text/plain": [ 422 | "[22.938,\n", 423 | " 27.9114,\n", 424 | " 32.59116,\n", 425 | " 36.299664,\n", 426 | " 39.2596656,\n", 427 | " 41.52366624,\n", 428 | " 46.419266496,\n", 429 | " 54.1345065984,\n", 430 | " 59.96080263936,\n", 431 | " 69.161321055744]" 432 | ] 433 | }, 434 | "execution_count": 14, 435 | "metadata": {}, 436 | "output_type": "execute_result" 437 | } 438 | ], 439 | "source": [ 440 | "alpha = 0.6\n", 441 | "\n", 442 | "exponential_smoothing_1(alpha, data)" 443 | ] 444 | }, 445 | { 446 | "cell_type": "code", 447 | "execution_count": 15, 448 | "metadata": {}, 449 | "outputs": [ 450 | { 451 | "data": { 452 | "text/plain": [ 453 | "([22.938,\n", 454 | " 29.900760000000002,\n", 455 | " 35.258808,\n", 456 | " 38.850124799999996,\n", 457 | " 41.46385056,\n", 458 | " 43.31094048,\n", 459 | " 49.0924162944,\n", 460 | " 58.28986255872,\n", 461 | " 63.953463439871996,\n", 462 | " 74.4385927425024],\n", 463 | " [0.0,\n", 464 | " 2.9840400000000016,\n", 465 | " 4.001471999999999,\n", 466 | " 3.825691199999994,\n", 467 | " 3.3062774399999983,\n", 468 | " 2.6809113600000027,\n", 469 | " 4.009724697600006,\n", 470 | " 6.233033940480001,\n", 471 | " 5.988991200767997,\n", 472 | " 7.915907530137594],\n", 473 | " [22.938,\n", 474 | " 32.884800000000006,\n", 475 | " 39.26028,\n", 476 | " 42.67581599999999,\n", 477 | " 44.77012799999999,\n", 478 | " 45.99185184,\n", 479 | " 53.10214099200001,\n", 480 | " 64.5228964992,\n", 481 | " 69.94245464064,\n", 482 | " 82.35450027263998])" 483 | ] 484 | }, 485 | "execution_count": 15, 486 | "metadata": {}, 487 | "output_type": "execute_result" 488 | } 489 | ], 490 | "source": [ 491 | "exponential_smoothing_2(alpha, data)" 492 | ] 493 | }, 494 | { 495 | "cell_type": "code", 496 | "execution_count": 16, 497 | "metadata": {}, 498 | "outputs": [ 499 | { 500 | "data": { 501 | "text/plain": [ 502 | "([22.938,\n", 503 | " 30.696503999999997,\n", 504 | " 35.8484208,\n", 505 | " 39.03909503999999,\n", 506 | " 41.40092831999999,\n", 507 | " 43.11900729600001,\n", 508 | " 49.369993244160014,\n", 509 | " 58.993775803392,\n", 510 | " 64.1699506738176,\n", 511 | " 75.03903199057918],\n", 512 | " [0.0,\n", 513 | " 6.266483999999973,\n", 514 | " 6.433624799999967,\n", 515 | " 4.60519343999997,\n", 516 | " 3.046723199999989,\n", 517 | " 1.8891869760000009,\n", 518 | " 5.154729615360027,\n", 519 | " 9.136676074752026,\n", 520 | " 6.882001040793558,\n", 521 | " 10.39271942845433],\n", 522 | " [0.0,\n", 523 | " 0.8952119999999988,\n", 524 | " 0.6633143999999972,\n", 525 | " 0.21259151999999565,\n", 526 | " -0.07078751999999876,\n", 527 | " -0.21592483199999174,\n", 528 | " 0.3122740684800122,\n", 529 | " 0.7919024002560019,\n", 530 | " 0.24354813818879956,\n", 531 | " 0.6754941540863956],\n", 532 | " [22.938,\n", 533 | " 37.85819999999997,\n", 534 | " 42.945359999999965,\n", 535 | " 43.85687999999996,\n", 536 | " 44.37686399999998,\n", 537 | " 44.79226944000001,\n", 538 | " 54.836996928000055,\n", 539 | " 68.92235427840004,\n", 540 | " 71.29549985279995,\n", 541 | " 86.1072455731199])" 542 | ] 543 | }, 544 | "execution_count": 16, 545 | "metadata": {}, 546 | "output_type": "execute_result" 547 | } 548 | ], 549 | "source": [ 550 | "exponential_smoothing_3(alpha, data)" 551 | ] 552 | }, 553 | { 554 | "cell_type": "markdown", 555 | "metadata": {}, 556 | "source": [ 557 | "误差分析,返回各期绝对误差、平均绝对误差、相对误差、平均相对误差" 558 | ] 559 | }, 560 | { 561 | "cell_type": "code", 562 | "execution_count": 17, 563 | "metadata": {}, 564 | "outputs": [ 565 | { 566 | "data": { 567 | "text/plain": [ 568 | "([8.289000000000001,\n", 569 | " 2.826199999999993,\n", 570 | " 0.48828000000000316,\n", 571 | " 1.4428159999999934,\n", 572 | " 1.7371279999999913,\n", 573 | " 3.6911481599999973,\n", 574 | " 6.175859007999989,\n", 575 | " 0.6778964992000027,\n", 576 | " 5.352545359360008],\n", 577 | " 3.408985891839998,\n", 578 | " ['26.54%',\n", 579 | " '7.91%',\n", 580 | " '1.26%',\n", 581 | " '3.50%',\n", 582 | " '4.04%',\n", 583 | " '7.43%',\n", 584 | " '10.42%',\n", 585 | " '1.06%',\n", 586 | " '7.11%'],\n", 587 | " '7.70%')" 588 | ] 589 | }, 590 | "execution_count": 17, 591 | "metadata": {}, 592 | "output_type": "execute_result" 593 | } 594 | ], 595 | "source": [ 596 | "a,b,F = exponential_smoothing_2(alpha, data)\n", 597 | "model_error_analysis(F, data)" 598 | ] 599 | }, 600 | { 601 | "cell_type": "markdown", 602 | "metadata": {}, 603 | "source": [ 604 | "输出二次、三次指数平滑结果到excel表" 605 | ] 606 | }, 607 | { 608 | "cell_type": "code", 609 | "execution_count": 18, 610 | "metadata": {}, 611 | "outputs": [], 612 | "source": [ 613 | "write_xls(alpha, data, t)" 614 | ] 615 | }, 616 | { 617 | "cell_type": "markdown", 618 | "metadata": {}, 619 | "source": [ 620 | "绘图,可输出折线图和散点图" 621 | ] 622 | }, 623 | { 624 | "cell_type": "code", 625 | "execution_count": 19, 626 | "metadata": {}, 627 | "outputs": [ 628 | { 629 | "data": { 630 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEbCAYAAAA21FQWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3dd3xUVfrH8c9DCiQhkAIh1BA6SBOQoiDowip2wa6gKFYsv9Xdta+ua99dV91dXSkqrhVRUcSCsNJUei8BpNcEAmlA+vP7404gxrRJMsmU5/168crkzr13ngnwzZlzzz1HVBVjjDGBoV5dF2CMMab2WOgbY0wAsdA3xpgAYqFvjDEBxELfGGMCiIW+McYEEAt94zdEJFhElonIUyLiFf+2RWSaiPx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OxIrIRNeUBdFAITBfVQtL7P434G8iEgn0AF5xbX8WZ2bSq1xTWRjjFWzIpjGlEJHmwARVfUxEPsQJ82Y4c7JkAv8FbsFpOBXiTH71EZCNM63AcJw5XDKB1ar6c62/CWNKYaFvjItrPpThOFMWROLc7r4ZuBJ4DmcyrDwgGGeWQ8Hp+rkH+DfOHDe34YR/Q6Czqv6+dt+FMeWr0alfjfFx6TjT6i7UUxOnISK9gY9VtaDkASKSCBxw7X9ARMbhTIp1O/BV7ZRtTOVZn74xLqpaoKpziwe+S05pge+SgNOlg4jcCPxDndk/BwJLPFetMVVjoW9MxQ6X81xbIMV1E9cR4GcR+SPOL4pjtVGcMe6w7h1jKra+nOdm4iyYQtFEWSISATxQC3UZ4za7kGtMBUQk3DWM0xifZ6FvjDEBxPr0jTEmgFjoG2NMALHQN8aYAGKhb4wxAcRC3xhjAoiFvjHGBJD/B45LkLtxuKJUAAAAAElFTkSuQmCC\n", 631 | "text/plain": [ 632 | "
" 633 | ] 634 | }, 635 | "metadata": { 636 | "needs_background": "light" 637 | }, 638 | "output_type": "display_data" 639 | } 640 | ], 641 | "source": [ 642 | "a_triple, b_triple, c_triple, F_triple = exponential_smoothing_3(alpha, data)\n", 643 | "line_chart(F_triple, data, t)" 644 | ] 645 | }, 646 | { 647 | "cell_type": "code", 648 | "execution_count": 20, 649 | "metadata": {}, 650 | "outputs": [ 651 | { 652 | "data": { 653 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEcCAYAAAAr0WSuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3de5yWdZ3/8dfbYZTz0RFUkkOOBxZBjDyUKLpQYm2aaehuWpbHxdw1t9RN16K2zR5t7Vqrv1i0TE0RyrbWVMhNxDMoiggomqCQchQEHGQY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HgwePBhJxQ6nzUUE69atY8WKFQwZMqTY4ZhZO9Puyjtbt26lX79+mUz4AJLo169fpv/SMbOWa3cjfSCzCb9W1n9+s45u1qJVzFm6hjGVFYwf1j+vx253I30zs45s1qJVXHnPfH751HKuvGc+sxatyuvxnfTNzErInKVrqKpOunJXVdcwZ+mavB7fST8PLrvsMlavXl3ve+vXr2fp0l3P0ogIampq9truhRdeYOrUqQC8/PLLXHfddYUJ1sxK2pjKCrqUJw9e61JexpjKersptFi7rOmXihkzZjBgwADGjRvH008/zZo1a5g5cya33HIL/fr1Y/LkyfTp04etW7fypS99ibvuuouNGzdy+umnc+yxx+52rIceeojTTjuNzZs38+qrr7J48WKuvvpqvva1r3HwwQcX6Sc0s7Y2flh/bj5vVMFq+plI+oW4KPLII4+wdu1ajjjiCPr378/zzz/Ppz71KbZu3cq2bdsA6Nu3L0cddRTDhw+nX79+XHnllSxfvpzFixfz/PPPc8wxxwCwZcsWVq5cydFHH838+fNZvHgx1113HUOHDqWiIr+f8mZW+sYP65/3ZF+rwyf92osiVdU1TJ+3gpvPG5WXX+ahhx7KRz7yER5//HE6derEW2+9xYABA5g0aecjUykvL+eVV17hjTfeYPPmzbz88sv07NmTM844g379+u3c7qc//Sm1D7NZtWoVPXv25M033+TLX/4yL7/8cqtjNTOr1eFr+oW6KDJo0CDee+89Zs+eTd++fenduzdz585l+vTpLF+eNLiTxDnnnMPw4cO59NJLufrqqxk2bBgDBw5k0KBBACxYsICxY8dS20K6U6fkc7iyspIxY8bkJVYzs1odPukX6qLI1KlTmT59Oocffjg33XQT27dvZ+3atfTs2ZN169YByY1kffr0oaysjNmzZ1NeXo4k/vSnP3HWWWdRU1PDiBEjOO6449ixYwcAXbt2Zdu2bXzwwQf06NEjL7GamdXq8OWdQl0UueiiiwDYtm0bc+fO5fzzz2fmzJmceeaZO2+eWrZsGQCPPvooX/nKV1iyZAkffPABF198MT169KC6upqysuQDadWqZC5up06dKC8vp1OnTnTu3DkvsZqZ1erwI31IEv/k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3yeR9xpJZMTnpmzXsAqCbpMMlXSbp6/VtlLYT+Kv09YclXdGmUZo1g5O+WT0kjQIGkNwF+VuSGTk/aWDzc4FySYOANcA7ko5vk0DNmslJ32wPkroCR0bExRHxbeBtoD/whfRmorrbDie5KesFkpt4LoqIGcAVkga3beRmjXPSN9tDRLwP9JM0JW1Z0AfYAcyOiB17bP5D4IeSegBHAf+Zrv8eSWfSz6etLMxKgqdsmtVD0oHApIi4XtK9JMm8P0lPlk3AncBXSAZOO0iaX00DtpK0FRhH0sNlE/BCRLzW5j+EWT2c9M1SaT+UcSQtC3qQ3O7+CnAO8G8kzbCqgU4kXQ5FUvr5KvBfJD1uLiFJ/t2BwyPin9r2pzDLLa+tX83auY0kbXXnxK7GaUg6GpgeETV77iBpCPB2uv3bki4kaYp1KfCHtgnbrOlc0zdLRURNRDxSN+GnPqgv4acGkZR0kPRF4MeRdP88HnimcNGatYyTvlnj1uZ4bzCwOr2Jaz3wmqRvkHxQbGmL4Myaw+Uds8YtzPHe70kemEJtoyxJ3YCr2yAus2bzhVyzRkjqmk7jNGv3nPTNzDLENX0zswxx0jczyxAnfTOzDHHSNzPLECd9M7MMcdI3M8uQ/w9G5CRcEidovAAAAABJRU5ErkJggg==\n", 654 | "text/plain": [ 655 | "
" 656 | ] 657 | }, 658 | "metadata": { 659 | "needs_background": "light" 660 | }, 661 | "output_type": "display_data" 662 | } 663 | ], 664 | "source": [ 665 | "a_double,b_double,F_double = exponential_smoothing_2(alpha, data)\n", 666 | "scatter_diagram(F_double, data, t)" 667 | ] 668 | }, 669 | { 670 | "cell_type": "code", 671 | "execution_count": null, 672 | "metadata": {}, 673 | "outputs": [], 674 | "source": [] 675 | } 676 | ], 677 | "metadata": { 678 | "kernelspec": { 679 | "display_name": "Python 3", 680 | "language": "python", 681 | "name": "python3" 682 | }, 683 | "language_info": { 684 | "codemirror_mode": { 685 | "name": "ipython", 686 | "version": 3 687 | }, 688 | "file_extension": ".py", 689 | "mimetype": "text/x-python", 690 | "name": "python", 691 | "nbconvert_exporter": "python", 692 | "pygments_lexer": "ipython3", 693 | "version": "3.8.2" 694 | } 695 | }, 696 | "nbformat": 4, 697 | "nbformat_minor": 4 698 | } 699 | -------------------------------------------------------------------------------- /exponential_smoothing/requirements.txt: -------------------------------------------------------------------------------- 1 | xlrd 2 | xlwt 3 | matplotlib 4 | numpy -------------------------------------------------------------------------------- /exponential_smoothing/折线图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/exponential_smoothing/折线图.png -------------------------------------------------------------------------------- /exponential_smoothing/指数平滑预测.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/exponential_smoothing/指数平滑预测.xls -------------------------------------------------------------------------------- /exponential_smoothing/散点图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/exponential_smoothing/散点图.png -------------------------------------------------------------------------------- /weighted_moving_forecasting_method/input.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ishelo/Logistics-Demand-Forecasting-By-Python/a830e9965d58d4c492206065c4083b307823cd21/weighted_moving_forecasting_method/input.xlsx -------------------------------------------------------------------------------- /weighted_moving_forecasting_method/main.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Date : 2019-03-08 00:10:00 3 | # @Author : Doratree (doratree@aliyun.com) 4 | # @Language : Python3.7 5 | 6 | import xlrd,xlwt 7 | 8 | def printIntro(): 9 | print("这个程序可用于加权滑动预测法") 10 | print("请将相关数据及权重按要求填写到填写到input.xlsx") 11 | print('''请注意:权值由小到大,从左到右依次填写在第一行; 12 | 重新运行文件请关闭excel的文件,防止文件被其他应用占用。''') 13 | input("请输入任意字符继续") 14 | print("-" * 30) 15 | 16 | def datainput(): #导入数据 17 | path = 'input.xlsx' 18 | rb = xlrd.open_workbook(path) 19 | data_sheet = rb.sheets()[0] 20 | rowNum = data_sheet.nrows 21 | m = rowNum - 2 #m为数据的个数 22 | data = [] 23 | for i in range(2, rowNum): 24 | data.append(data_sheet.cell_value(i, 0)) 25 | colNum = data_sheet.ncols 26 | n = colNum - 1 #n为权值的个数 27 | weights = [] 28 | for j in range(1, colNum): 29 | weights.append(data_sheet.cell_value(0, j)) 30 | print("数据导入成功") 31 | print("导入的实际值为:",data) 32 | print("导入的权值为:", weights) 33 | print("正在进行n={n}的加权滑动预测计算...".format(n=n)) 34 | print("-"*30) 35 | return data, weights, n, m 36 | 37 | def action(data, weights, n, m): 38 | forecast = [] 39 | dvalue = [] 40 | for i in range(n,m+1): #求预测值 41 | y = 0 42 | a = 0 43 | for j in range(n): 44 | y += weights[j]*data[i-n+a] 45 | a +=1 46 | y = round(int(y*1000)/1000,2) 47 | forecast.append(y) 48 | for i in range(m-n): #求绝对误差值 49 | x = abs(data[i+n]-forecast[i]) 50 | x = round(int(x * 1000) / 1000, 2) 51 | dvalue.append(x) 52 | s = 0 53 | for i in range(m-n): #求平均绝对误差值 54 | s +=dvalue[i] 55 | average = s/(m-n) 56 | average = round(int(average * 1000) / 1000, 2) 57 | return forecast, dvalue, average 58 | 59 | 60 | def print_Summary(forecast, dvalue, average, n): #输出结果并保存在表格 61 | print("从第{n}个时期起,预测值为".format(n=n+1), forecast) 62 | print("从第{n}个时期起,绝对误差值为".format(n=n+1), dvalue) 63 | print("其平均绝对误差值为", average) 64 | 65 | def set_style(name, height, bold=False): 66 | style = xlwt.XFStyle() # 初始化样式 67 | font = xlwt.Font() # 为样式创建字体 68 | font.name = name 69 | font.bold = bold 70 | font.color_index = 4 71 | font.height = height 72 | style.font = font 73 | return style 74 | 75 | def write_excel(forecast, dvalue, average, m, n, data, weights): #写入文件 76 | f = xlwt.Workbook() 77 | sheet1 = f.add_sheet(u'sheet1', cell_overwrite_ok=True) 78 | row1 = [u'时间', u'实际值', u'预测值', u'绝对误差', u'平均绝对误差'] 79 | sheet1.write(0, 0, '权值', set_style('Times New Roman', 220, True)) 80 | for i in range(n): 81 | sheet1.write(0, i+1, weights[i], set_style('Times New Roman', 220, True)) 82 | for i in range(0, len(row1)): 83 | sheet1.write(1, i, row1[i], set_style('Times New Roman', 220, True)) 84 | for i in range(m+1): 85 | sheet1.write(i+2, 0, i+1, set_style('Times New Roman', 220, True)) 86 | for i in range(len(data)): 87 | sheet1.write(i+2, 1, data[i], set_style('Times New Roman', 220, True)) 88 | for i in range(n,m+1): 89 | sheet1.write(i+2, 2, forecast[i-n], set_style('Times New Roman', 220, True)) 90 | for i in range(n, m): 91 | sheet1.write(i+2, 3, dvalue[i-n], set_style('Times New Roman', 220, True)) 92 | sheet1.write(2, 4, average, set_style('Times New Roman', 220, True)) 93 | f.save('out.xls') 94 | print("已经将数据写入out.xls") 95 | 96 | def mian(): 97 | printIntro() 98 | data, weights, n, m= datainput() 99 | forecast, dvalue,average = action(data, weights, n, m) 100 | print_Summary(forecast, dvalue, average, n) 101 | write_excel(forecast, dvalue, average, m, n, data, weights) 102 | 103 | mian() 104 | -------------------------------------------------------------------------------- /weighted_moving_forecasting_method/requirements.txt: -------------------------------------------------------------------------------- 1 | xlrd 2 | xlwt --------------------------------------------------------------------------------