probcomputtools


Nameprobcomputtools JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Ulti-Dreisteine/Probabilistic-Computing-Tools
SummaryPackage for information estimation, independence test, causal structure mining, etc.
upload_time2024-03-08 09:48:44
maintainer
docs_urlNone
authorDreisteine
requires_python== 3.8.8
licenseMIT
keywords python information estimation time series transfer entropy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### 概率计算工具

#### 环境配置

```
conda create -c conda-forge -n stat_comput python=3.8 "pymc>=4"
```

dependencies: requiments.txt

#### Package Info

https://pypi.org/search/?q=giefstat

#### Project Purpose

This project aims to lay a basis for:
1. computing higher-order information interactions between different types (discrete & continuous) of variables
2. uncovering complex associations and causal relationships in high-dimensional, nonlinear and nonstationary data

#### Project Structure

```
    |-- giefstat
    |   |
    |   |-- __init__.py
    |   |-- setting.py                      # 项目设置
    |   |-- util.py                         # 通用工具
    |   |
    |   |-- coefficient                     # 基于KNN和KDE等方法的数据信息计算和关联估计方法
    |   |   |-- __init__.py
    |   |   |
    |   |   |-- corr_coeff                  # 常见相关系数
    |   |   |   |-- __init__.py
    |   |   |   |-- coeff.py                # Pearson系数、Spearman系数和距离相关系数
    |   |   |
    |   |   |-- mi_gief                     # 通用信息估计
    |   |   |   |-- __init__.py
    |   |   |   |-- entropy                 # 信息熵
    |   |   |   |   |-- __init__.py
    |   |   |   |   |-- cond_entropy.py     # 条件熵估计
    |   |   |   |   |-- marg_entropy.py     # 边际熵估计
    |   |   |   |-- mutual_info
    |   |   |       |-- __init__.py
    |   |   |       |-- _kraskov.py         # 由Kraskov等提出的K近邻互信息估计
    |   |   |       |-- _ross.py            # 由Ross等提出的互信息估计
    |   |   |       |-- mi.py               # 互信息估计
    |   |   |       |-- cmi.py              # 条件互信息估计
    |   |   |
    |   |   |-- mi_kde                      # 基于KDE的边际熵和互信息估计
    |   |   |   |-- __init__.py
    |   |   |   |-- kde.py  
    |   |   |
    |   |   |-- mic                         # 最大信息系数
    |   |   |   |-- __init__.py
    |   |   |   |-- _mic_rmic.py            # MIC和RMIC计算
    |   |   |   |-- mi_cmi.py               # 基于MIC和RMIC的互信息和条件互信息估计
    |   |   |   |-- rgsr.pickle             # RMIC中用于修正MIC下界的回归模型
    |   |   |
    |   |   |-- mi_model
    |   |   |   |-- __init__.py
    |   |   |   |-- mi_cmi.py               # 基于机器学习预测模型的关联和条件关联系数估计
    |   |   |
    |   |   |-- mi_quant
    |   |       |-- __init__.py
    |   |       |-- _quant_darbellay.py     # Darbellay数据离散化方法
    |   |       |-- mi_classic.py           # 基于经典等距和等频离散化的互信息估计
    |   |       |-- mi_darbellay.py         # 基于Darbellay离散化的互信息估计
    |   |   
    |   |-- indep_test
    |   |   |-- __init__.py
    |   |   |-- surrog_indep_test.py        # 基于Bootstrap的关联度量和独立性检验
    |   |
    |   |-- time_series                     # 时序关联和因果挖掘
    |   |   |-- __init__.py
    |   |   |-- util.py                     # 序列符号化、时延峰解析等工具
    |   |   |-- td_assoc_analysis.py        # 成对时延关联分析
    |   |   |-- transfer_entropy.py         # 成对时延传递熵检验
    |   |   |-- partial_transfer_entropy.py # 成对时延偏传递熵检验
    |   
    |-- test                                # 对应方法的单元测试和应用案例
    |   |-- coefficient
    |   |   |-- corr_coeff
    |   |   |   |-- test.py                 # unittest
    |   |   |-- mi_gief
    |   |   |   |-- test.py                 # unittest
    |   |   |-- mi_kde
    |   |   |   |-- test.py                 # unittest
    |   |   |-- mi_model
    |   |   |-- |-- test.py                 # unittest
    |   |   |-- mi_quant
    |   |   |-- |-- test.py                 # unittest
    |   |   |-- mic
    |   |   |-- |-- test.py                 # unittest
    |   |
    |   |-- independence_test
    |   |   |-- test_surrog_indep_test.py   # 案例测试
    |   |
    |   |-- time_series
    |   |   |-- test_real_td_assoc_analysis.py  # 案例测试
    |   |   |-- test_simple_td_assoc_analysis.py    # 案例测试
    |   |   |-- test_transfer_entropy_cyclic.py # 案例测试
    |   |   |-- test_transfer_entropy_siso.py   # 案例测试
```
   
#### Notes

1. <font color="red">根据FGD测试结果, 离散变量可被stdize_values处理后视为连续变量, 代入MI-GIEF中进行计算</font>
2. <font color="red">stdize_values在对连续变量处理过程时加入了噪音并归一化</font>


#### References

1. A. Kraskov, H. Stoegbauer, P. Grassberger: Estimating Mutual Information. Physical Review E, 2003.
2. D. Lombardi, S. Pant: A Non-Parametric K-Nearest Neighbor Entropy Estimator. Physical Review E, 2015.
3. B. C. Ross: Mutual Information between Discrete and Continuous Data Sets. PLoS One, 2014.
4. https://github.com/dizcza/entropy-estimators
5. https://github.com/danielhomola/mifs

#### Todos

1. 紧凑时序因果挖掘
2. 基于贝叶斯网络的独立性检验

#### 包的发布

```bash
python setup.py sdist bdist_wheel
python setup.py install

pip install twine
twine upload dist/*
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Ulti-Dreisteine/Probabilistic-Computing-Tools",
    "name": "probcomputtools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "== 3.8.8",
    "maintainer_email": "",
    "keywords": "python,information estimation,time series,transfer entropy",
    "author": "Dreisteine",
    "author_email": "dreisteine@163.com",
    "download_url": "",
    "platform": null,
    "description": "### \u6982\u7387\u8ba1\u7b97\u5de5\u5177\r\n\r\n#### \u73af\u5883\u914d\u7f6e\r\n\r\n```\r\nconda create -c conda-forge -n stat_comput python=3.8 \"pymc>=4\"\r\n```\r\n\r\ndependencies: requiments.txt\r\n\r\n#### Package Info\r\n\r\nhttps://pypi.org/search/?q=giefstat\r\n\r\n#### Project Purpose\r\n\r\nThis project aims to lay a basis for:\r\n1. computing higher-order information interactions between different types (discrete & continuous) of variables\r\n2. uncovering complex associations and causal relationships in high-dimensional, nonlinear and nonstationary data\r\n\r\n#### Project Structure\r\n\r\n```\r\n    |-- giefstat\r\n    |   |\r\n    |   |-- __init__.py\r\n    |   |-- setting.py                      # \u9879\u76ee\u8bbe\u7f6e\r\n    |   |-- util.py                         # \u901a\u7528\u5de5\u5177\r\n    |   |\r\n    |   |-- coefficient                     # \u57fa\u4e8eKNN\u548cKDE\u7b49\u65b9\u6cd5\u7684\u6570\u636e\u4fe1\u606f\u8ba1\u7b97\u548c\u5173\u8054\u4f30\u8ba1\u65b9\u6cd5\r\n    |   |   |-- __init__.py\r\n    |   |   |\r\n    |   |   |-- corr_coeff                  # \u5e38\u89c1\u76f8\u5173\u7cfb\u6570\r\n    |   |   |   |-- __init__.py\r\n    |   |   |   |-- coeff.py                # Pearson\u7cfb\u6570\u3001Spearman\u7cfb\u6570\u548c\u8ddd\u79bb\u76f8\u5173\u7cfb\u6570\r\n    |   |   |\r\n    |   |   |-- mi_gief                     # \u901a\u7528\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |   |-- __init__.py\r\n    |   |   |   |-- entropy                 # \u4fe1\u606f\u71b5\r\n    |   |   |   |   |-- __init__.py\r\n    |   |   |   |   |-- cond_entropy.py     # \u6761\u4ef6\u71b5\u4f30\u8ba1\r\n    |   |   |   |   |-- marg_entropy.py     # \u8fb9\u9645\u71b5\u4f30\u8ba1\r\n    |   |   |   |-- mutual_info\r\n    |   |   |       |-- __init__.py\r\n    |   |   |       |-- _kraskov.py         # \u7531Kraskov\u7b49\u63d0\u51fa\u7684K\u8fd1\u90bb\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |       |-- _ross.py            # \u7531Ross\u7b49\u63d0\u51fa\u7684\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |       |-- mi.py               # \u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |       |-- cmi.py              # \u6761\u4ef6\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |\r\n    |   |   |-- mi_kde                      # \u57fa\u4e8eKDE\u7684\u8fb9\u9645\u71b5\u548c\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |   |-- __init__.py\r\n    |   |   |   |-- kde.py  \r\n    |   |   |\r\n    |   |   |-- mic                         # \u6700\u5927\u4fe1\u606f\u7cfb\u6570\r\n    |   |   |   |-- __init__.py\r\n    |   |   |   |-- _mic_rmic.py            # MIC\u548cRMIC\u8ba1\u7b97\r\n    |   |   |   |-- mi_cmi.py               # \u57fa\u4e8eMIC\u548cRMIC\u7684\u4e92\u4fe1\u606f\u548c\u6761\u4ef6\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   |   |-- rgsr.pickle             # RMIC\u4e2d\u7528\u4e8e\u4fee\u6b63MIC\u4e0b\u754c\u7684\u56de\u5f52\u6a21\u578b\r\n    |   |   |\r\n    |   |   |-- mi_model\r\n    |   |   |   |-- __init__.py\r\n    |   |   |   |-- mi_cmi.py               # \u57fa\u4e8e\u673a\u5668\u5b66\u4e60\u9884\u6d4b\u6a21\u578b\u7684\u5173\u8054\u548c\u6761\u4ef6\u5173\u8054\u7cfb\u6570\u4f30\u8ba1\r\n    |   |   |\r\n    |   |   |-- mi_quant\r\n    |   |       |-- __init__.py\r\n    |   |       |-- _quant_darbellay.py     # Darbellay\u6570\u636e\u79bb\u6563\u5316\u65b9\u6cd5\r\n    |   |       |-- mi_classic.py           # \u57fa\u4e8e\u7ecf\u5178\u7b49\u8ddd\u548c\u7b49\u9891\u79bb\u6563\u5316\u7684\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |       |-- mi_darbellay.py         # \u57fa\u4e8eDarbellay\u79bb\u6563\u5316\u7684\u4e92\u4fe1\u606f\u4f30\u8ba1\r\n    |   |   \r\n    |   |-- indep_test\r\n    |   |   |-- __init__.py\r\n    |   |   |-- surrog_indep_test.py        # \u57fa\u4e8eBootstrap\u7684\u5173\u8054\u5ea6\u91cf\u548c\u72ec\u7acb\u6027\u68c0\u9a8c\r\n    |   |\r\n    |   |-- time_series                     # \u65f6\u5e8f\u5173\u8054\u548c\u56e0\u679c\u6316\u6398\r\n    |   |   |-- __init__.py\r\n    |   |   |-- util.py                     # \u5e8f\u5217\u7b26\u53f7\u5316\u3001\u65f6\u5ef6\u5cf0\u89e3\u6790\u7b49\u5de5\u5177\r\n    |   |   |-- td_assoc_analysis.py        # \u6210\u5bf9\u65f6\u5ef6\u5173\u8054\u5206\u6790\r\n    |   |   |-- transfer_entropy.py         # \u6210\u5bf9\u65f6\u5ef6\u4f20\u9012\u71b5\u68c0\u9a8c\r\n    |   |   |-- partial_transfer_entropy.py # \u6210\u5bf9\u65f6\u5ef6\u504f\u4f20\u9012\u71b5\u68c0\u9a8c\r\n    |   \r\n    |-- test                                # \u5bf9\u5e94\u65b9\u6cd5\u7684\u5355\u5143\u6d4b\u8bd5\u548c\u5e94\u7528\u6848\u4f8b\r\n    |   |-- coefficient\r\n    |   |   |-- corr_coeff\r\n    |   |   |   |-- test.py                 # unittest\r\n    |   |   |-- mi_gief\r\n    |   |   |   |-- test.py                 # unittest\r\n    |   |   |-- mi_kde\r\n    |   |   |   |-- test.py                 # unittest\r\n    |   |   |-- mi_model\r\n    |   |   |-- |-- test.py                 # unittest\r\n    |   |   |-- mi_quant\r\n    |   |   |-- |-- test.py                 # unittest\r\n    |   |   |-- mic\r\n    |   |   |-- |-- test.py                 # unittest\r\n    |   |\r\n    |   |-- independence_test\r\n    |   |   |-- test_surrog_indep_test.py   # \u6848\u4f8b\u6d4b\u8bd5\r\n    |   |\r\n    |   |-- time_series\r\n    |   |   |-- test_real_td_assoc_analysis.py  # \u6848\u4f8b\u6d4b\u8bd5\r\n    |   |   |-- test_simple_td_assoc_analysis.py    # \u6848\u4f8b\u6d4b\u8bd5\r\n    |   |   |-- test_transfer_entropy_cyclic.py # \u6848\u4f8b\u6d4b\u8bd5\r\n    |   |   |-- test_transfer_entropy_siso.py   # \u6848\u4f8b\u6d4b\u8bd5\r\n```\r\n   \r\n#### Notes\r\n\r\n1. <font color=\"red\">\u6839\u636eFGD\u6d4b\u8bd5\u7ed3\u679c, \u79bb\u6563\u53d8\u91cf\u53ef\u88abstdize_values\u5904\u7406\u540e\u89c6\u4e3a\u8fde\u7eed\u53d8\u91cf, \u4ee3\u5165MI-GIEF\u4e2d\u8fdb\u884c\u8ba1\u7b97</font>\r\n2. <font color=\"red\">stdize_values\u5728\u5bf9\u8fde\u7eed\u53d8\u91cf\u5904\u7406\u8fc7\u7a0b\u65f6\u52a0\u5165\u4e86\u566a\u97f3\u5e76\u5f52\u4e00\u5316</font>\r\n\r\n\r\n#### References\r\n\r\n1. A. Kraskov, H. Stoegbauer, P. Grassberger: Estimating Mutual Information. Physical Review E, 2003.\r\n2. D. Lombardi, S. Pant: A Non-Parametric K-Nearest Neighbor Entropy Estimator. Physical Review E, 2015.\r\n3. B. C. Ross: Mutual Information between Discrete and Continuous Data Sets. PLoS One, 2014.\r\n4. https://github.com/dizcza/entropy-estimators\r\n5. https://github.com/danielhomola/mifs\r\n\r\n#### Todos\r\n\r\n1. \u7d27\u51d1\u65f6\u5e8f\u56e0\u679c\u6316\u6398\r\n2. \u57fa\u4e8e\u8d1d\u53f6\u65af\u7f51\u7edc\u7684\u72ec\u7acb\u6027\u68c0\u9a8c\r\n\r\n#### \u5305\u7684\u53d1\u5e03\r\n\r\n```bash\r\npython setup.py sdist bdist_wheel\r\npython setup.py install\r\n\r\npip install twine\r\ntwine upload dist/*\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package for information estimation, independence test, causal structure mining, etc.",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Ulti-Dreisteine/Probabilistic-Computing-Tools"
    },
    "split_keywords": [
        "python",
        "information estimation",
        "time series",
        "transfer entropy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebe67f9ab59f0e69bc3fd64f1b6a55bf73c2f428298dcb6a7e22ac0500d32831",
                "md5": "4a8911c91b7af90c81d5f9e5e1867de9",
                "sha256": "7b3a1bccc2a85f78d1c4b74012d78f62ecaac437264c9969e19705ad2c50e211"
            },
            "downloads": -1,
            "filename": "probcomputtools-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a8911c91b7af90c81d5f9e5e1867de9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "== 3.8.8",
            "size": 4031,
            "upload_time": "2024-03-08T09:48:44",
            "upload_time_iso_8601": "2024-03-08T09:48:44.588529Z",
            "url": "https://files.pythonhosted.org/packages/eb/e6/7f9ab59f0e69bc3fd64f1b6a55bf73c2f428298dcb6a7e22ac0500d32831/probcomputtools-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-08 09:48:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ulti-Dreisteine",
    "github_project": "Probabilistic-Computing-Tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "probcomputtools"
}
        
Elapsed time: 2.96245s