{ "info": { "author": "Krzysztof Chalupka", "author_email": "janchatko@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Artificial Intelligence" ], "description": ".. image:: https://img.shields.io/badge/License-MIT-yellow.svg\n :target: https://opensource.org/licenses/MIT\n :alt: License\n\n*A Decision Tree (Conditional) Independence Test (DTIT).*\n\nIntroduction\n-----------\nLet *x, y, z* be random variables. Then deciding whether *P(y | x, z) = P(y | z)* \ncan be difficult, especially if the variables are continuous. This package \nimplements a simple yet efficient and effective conditional independence test,\ndescribed in [link to arXiv when we write it up!]. Important features that differentiate\nthis test from competition:\n\n* It is fast. Worst-case speed scales as O(n_data * log(n_data) * dim), where dim is max(x_dim + z_dim, y_dim). However, amortized speed is O(n_data * log(n_data) * log(dim)).\n\n* It applies to cases where some of x, y, z are continuous and some are discrete, or categorical (one-hot-encoded).\n\n* It is very simple to understand and modify.\n\n* It can be used for unconditional independence testing with almost no changes to the procedure.\n\nWe have applied this test to tens of thousands of samples of thousand-dimensional datapoints in seconds. For smaller dimensionalities and sample sizes, it takes a fraction of a second. The algorithm is described in [arXiv link coming], where we also provide detailed experimental results and comparison with other methods. However for now, you should be able to just look through the code to understand what's going on -- it's only 90 lines of Python, including detailed comments!\n\nUsage\n-----\nBasic usage is simple, and the default settings should work in most cases. To perform an *unconditional test*, use dtit.test(x, y):\n\n.. code:: python\n\n import numpy as np\n from dtit import dtit\n\n x = np.random.rand(1000, 1)\n y = np.random.randn(1000, 1)\n\n pval_i = dtit.test(x, y) # p-value should be uniform on [0, 1].\n pval_d = dtit.test(x, x + y) # p-value should be very small.\n\nTo perform a conditional test, just add the third variable z to the inputs:\n\n.. code:: python\n\n import numpy as np\n from dtit import dtit\n\n # Generate some data such that x is indpendent of y given z.\n n_samples = 1000\n z = np.random.dirichlet(alpha=np.ones(2), size=n_samples)\n x = np.vstack([np.random.multinomial(20, p) for p in z]).astype(float)\n y = np.vstack([np.random.multinomial(20, p) for p in z]).astype(float)\n\n # Check that x and y are dependent (p-value should be uniform on [0, 1]).\n pval_d = dtit.test(x, y)\n # Check that z d-separates x and y (the p-value should be small).\n pval_i = dtit.test(x, y, z)\n\nInstallation\n-----------\npip install dtit\n\n\nRequirements\n------------\nTested with Python 3.6 and\n\n * numpy >= 1.12\n * scikit-learn >= 0.18.1\n * scipy >= 0.16.1\n\n.. _pip: http://www.pip-installer.org/en/latest/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kjchalup/dtit", "keywords": "machine learning statistics decision trees", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dtit", "package_url": "https://pypi.org/project/dtit/", "platform": "", "project_url": "https://pypi.org/project/dtit/", "project_urls": { "Homepage": "https://github.com/kjchalup/dtit" }, "release_url": "https://pypi.org/project/dtit/1.2.0/", "requires_dist": [ "joblib", "numpy", "scipy", "sklearn" ], "requires_python": "", "summary": "A decision-tree based conditional independence test", "version": "1.2.0" }, "last_serial": 3454597, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1bb602da72ca8ed980316d3175c2732f", "sha256": "e103f695c5591b2669cff821c0fff72a4d2c714d54c0997089331051b0c6eebb" }, "downloads": -1, "filename": "dtit-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1bb602da72ca8ed980316d3175c2732f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4438, "upload_time": "2017-07-09T23:26:10", "url": "https://files.pythonhosted.org/packages/d5/0f/b877348993b4bf2d0aa2ae6a8ebdefdddf8660b31c8de87bf0f32d7c3b3a/dtit-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d1025c14bab6aaa47d5d84787d8a9d0", "sha256": "9f4e7853ce2fb42f9453801b9a41d12d74ce8896651f0ecf15c652381312ba63" }, "downloads": -1, "filename": "dtit-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6d1025c14bab6aaa47d5d84787d8a9d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4264, "upload_time": "2017-07-09T23:26:11", "url": "https://files.pythonhosted.org/packages/4f/aa/4b3d17c8632eebcc2bbf3712b82a0ed7711e2f7335dcda7d8c9093e12dbb/dtit-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f08e3160d886b3fa33d5d811bf8bbd29", "sha256": "0192a5797c204ebe7900c2a48b8862bedb367fd6b358e183fba9c42021891977" }, "downloads": -1, "filename": "dtit-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f08e3160d886b3fa33d5d811bf8bbd29", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6015, "upload_time": "2017-07-09T23:45:40", "url": "https://files.pythonhosted.org/packages/0a/d2/841236183d59d1369d14cf1d996466d1719502994baaa2d830218def6bae/dtit-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "72f9ea4dbaae00a6e7d7d117bcc1efb6", "sha256": "6d5bcab5eefb8c1c99e97a01fde242c68edc262eeb9bc70463f152224e54681f" }, "downloads": -1, "filename": "dtit-1.0.1.tar.gz", "has_sig": false, "md5_digest": "72f9ea4dbaae00a6e7d7d117bcc1efb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4332, "upload_time": "2017-07-09T23:45:41", "url": "https://files.pythonhosted.org/packages/57/cb/c9b0a5512f66f444cdf4be5b68c920250c5687a261474f61eb24e7a981ee/dtit-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "5d0c7f779d4037f317be60071e246043", "sha256": "13c8b8ac609c0a3ee2353d3b0c7bdad254bf3acdacbf2bd5cd6823eb74d5de3a" }, "downloads": -1, "filename": "dtit-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5d0c7f779d4037f317be60071e246043", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6190, "upload_time": "2017-07-10T00:01:39", "url": "https://files.pythonhosted.org/packages/2f/a2/94ec4e63b621d16106ca91727479f7a4655ef564db9b5e204228818ec20f/dtit-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4c1fb888faf089f3fcd9133095f21312", "sha256": "d5a859abb1846eb2099d6b2a5c210aa7a71096c5b9a638cbd3b2dcc79ea073e4" }, "downloads": -1, "filename": "dtit-1.0.2.tar.gz", "has_sig": false, "md5_digest": "4c1fb888faf089f3fcd9133095f21312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4436, "upload_time": "2017-07-10T00:01:40", "url": "https://files.pythonhosted.org/packages/ba/d8/ffcd3d19f599e6761608f026678617553eb814bd381491df7eb9a80b9d01/dtit-1.0.2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "568de2b9f4e51fbde1cbcd9459da9d12", "sha256": "0f54e2dfa1f3f7ebb67cba1b422f5625a4669b72f8b075619137dea93cb47eed" }, "downloads": -1, "filename": "dtit-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "568de2b9f4e51fbde1cbcd9459da9d12", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6343, "upload_time": "2017-07-10T20:59:49", "url": "https://files.pythonhosted.org/packages/ba/5f/785ef2e36d2cff49c535d7fc146f71b4947ec2917184600c294751f9d674/dtit-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "adfdafe794833adb31422fde64198f8f", "sha256": "d96fbc6efd17c34426c5d0953c28de4e4cbd536980e35610860a5f26ce14333a" }, "downloads": -1, "filename": "dtit-1.1.0.tar.gz", "has_sig": false, "md5_digest": "adfdafe794833adb31422fde64198f8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4567, "upload_time": "2017-07-10T20:59:51", "url": "https://files.pythonhosted.org/packages/ef/69/9b741544d6efebdd9a133838e46af972d8dad0bf88f1410f87e707e59463/dtit-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "00ca3ef53ac29ffe86cfbd26703a2a1c", "sha256": "be31eb8b42b882f5f149d0c413ab53ed37128b1282ed5d3a379b7d59fb7a2549" }, "downloads": -1, "filename": "dtit-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "00ca3ef53ac29ffe86cfbd26703a2a1c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7623, "upload_time": "2018-01-01T15:24:49", "url": "https://files.pythonhosted.org/packages/1b/4e/2be0f32e3d37fba98112ee9eb8c6f7e31f468a66f0acb3951a1e382033a3/dtit-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4552cf8041f9d3b2f067c1732fb2ff08", "sha256": "b352ef77bee229f1fc987205c725792098fb5f3294a70e5619592fc9673f133f" }, "downloads": -1, "filename": "dtit-1.2.0.tar.gz", "has_sig": false, "md5_digest": "4552cf8041f9d3b2f067c1732fb2ff08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5854, "upload_time": "2018-01-01T15:24:51", "url": "https://files.pythonhosted.org/packages/6f/90/ef65ee82665740e4cd1caa8e9e6fe56e2c90b63d74bcdf8c54afe0dfc169/dtit-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "00ca3ef53ac29ffe86cfbd26703a2a1c", "sha256": "be31eb8b42b882f5f149d0c413ab53ed37128b1282ed5d3a379b7d59fb7a2549" }, "downloads": -1, "filename": "dtit-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "00ca3ef53ac29ffe86cfbd26703a2a1c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7623, "upload_time": "2018-01-01T15:24:49", "url": "https://files.pythonhosted.org/packages/1b/4e/2be0f32e3d37fba98112ee9eb8c6f7e31f468a66f0acb3951a1e382033a3/dtit-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4552cf8041f9d3b2f067c1732fb2ff08", "sha256": "b352ef77bee229f1fc987205c725792098fb5f3294a70e5619592fc9673f133f" }, "downloads": -1, "filename": "dtit-1.2.0.tar.gz", "has_sig": false, "md5_digest": "4552cf8041f9d3b2f067c1732fb2ff08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5854, "upload_time": "2018-01-01T15:24:51", "url": "https://files.pythonhosted.org/packages/6f/90/ef65ee82665740e4cd1caa8e9e6fe56e2c90b63d74bcdf8c54afe0dfc169/dtit-1.2.0.tar.gz" } ] }