Skip to main content

Diebold Mariano test

Project description

Diebold Mariano Test 工具包

Python package PyPI version Python

特点

通过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

diebold-mariano-test-0.0.8.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

diebold_mariano_test-0.0.8-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file diebold-mariano-test-0.0.8.tar.gz.

File metadata

  • Download URL: diebold-mariano-test-0.0.8.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

Hashes for diebold-mariano-test-0.0.8.tar.gz
Algorithm Hash digest
SHA256 94a13527bae50d96877e05d5421df7da967f7e17297f03cc2a7cf369f740a2d1
MD5 72966cd7192adf65ee5648889ec2066c
BLAKE2b-256 ff3fb6bc2596cf5a40aff1fbb197cd03ae1f23d8f96b53084cbc8cf4b9f6603c

See more details on using hashes here.

File details

Details for the file diebold_mariano_test-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: diebold_mariano_test-0.0.8-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

Hashes for diebold_mariano_test-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 655eb7a5aeee383e8593ccc85bc4801782bfa1221a8456e4fc1a7e5caf062cac
MD5 290283ad1e71977b6c5651417d99446d
BLAKE2b-256 ddc7d279030f72a0a6bf0eea7179f8c8816e987b802351f6aaa27fa361883e07

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page