Diebold Mariano test
Project description
Diebold Mariano Test 工具包
特点
通过DM检验的结果,可以判别任意两类算法的预测结果是否存在差异性。
安装
pip install diebold-mariano-test
更新
pip install --upgrade diebold-mariano-test
使用说明
>>> # 导入包
>>> from diebold_mariano_test import *
>>> ori_list = [3, 5, 4, 1] # 原始时间序列数据
>>> a1_list = [2, 3, 4, 2] # 预测算法一得到的时间序列数据
>>> a2_list = [3, 2, 2, 4] # 预测算法二得到的时间序列数据
>>> # 使用MSE方法计算 Diebold-Mariano Test.
>>> d_t_list = cul_d_t(MSE, ori_list, a1_list, a2_list)
>>> print(d_t_list) # 输出中间变量d_t的数值。
[1, -4, -8, -16]
>>> cul_DM(d_t_list) # 输出结果
-2.254898764780173
>>> cul_P(d_t_list) # 输出伴随的P值
0.024139683878213303
>>> # 使用MAE方法计算 Diebold-Mariano Test.
>>> d_t_list = cul_d_t(MAE, ori_list, a1_list, a2_list)
>>> print(d_t_list) # 输出中间变量d_t的数值。
[1, 0, -2, -4]
>>> cul_DM(d_t_list) # 输出结果
-1.4213381090374029
>>> cul_P(d_t_list) # 输出伴随的P值
0.155218489684684
说明
项目发布于PyPI:单击访问
本模块尚不完善,有任何相关问题或建议,欢迎在本项目的github页面中提交issue: 单击访问
License
GNU General Public License v3.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file diebold-mariano-test-0.0.7.tar.gz
.
File metadata
- Download URL: diebold-mariano-test-0.0.7.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 083e2fb0e883ece88c03a3ecc99bafd5548755e8a4f64fca750a832f988ef1b1 |
|
MD5 | 55f14ff94b449ae75fed8b60cfc7f844 |
|
BLAKE2b-256 | 2e04c84bd994a96b0272e41f9f10f40ce01f2afbd15363d43050146f1f57ca18 |
File details
Details for the file diebold_mariano_test-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: diebold_mariano_test-0.0.7-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fed8bcb988efd843f7f90a3dde51795d073de875563b6a8624b87361edce6a5 |
|
MD5 | 60902c9c69d98660d6747e0428955c96 |
|
BLAKE2b-256 | 432ea206be31b00452524c144f82abf05ee1cbc040e12c222f6a4330e8ce5559 |