{ "info": { "author": "Igor Gotlibovych", "author_email": "igor.gotlibovych@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "[![PyPI version](https://badge.fury.io/py/deepquantiles.svg)](https://badge.fury.io/py/deepquantiles)\n[![Build Status](https://travis-ci.com/ig248/deepquantiles.svg?branch=master)](https://travis-ci.com/ig248/deepquantiles)\n[![Coverage Status](https://codecov.io/gh/ig248/deepquantiles/branch/master/graph/badge.svg)](https://codecov.io/gh/ig248/deepquantiles)\n\n# Deep Continuous Quantile Regression\nThis package explores different approaches to learning the uncertainty,\nand, more generally, the conditional distribution of the target variable. We introduce a new type of network, the \"Deep Continuous Quantile Regression Network\", that approximates the inverse conditional CDF directly by a mult-layer perceptron, instead of relying on variational methods which require priors on the functional form of the distribution. In many cases we find that it presents a robust alternative to well-known Mixture Density Networks`.\n\n![](https://raw.githubusercontent.com/ig248/deepquantiles/master/README_pics/comparison_good_MDN_good_CDF.png)\n\nThis is particularily important when\n\n- the mean of the target variable is not sufficient for the use case\n- the errors are heteroscedastic, i.e. vary depending on input features\n- the errors are skewed, making a single summary statistic such as variance inadequate.\n\n![](https://raw.githubusercontent.com/ig248/deepquantiles/master/README_pics/comparison_skewed_samples.png)\n\nWe explore two main approches:\n1. fitting a mixture density model\n2. learning the location of conditional qunatiles, `q`, of the distribution.\n\nOur mixture density network exploits an implementation trick to achieve negative-log-likelihood minimisation in `keras`.\n\n![](https://raw.githubusercontent.com/ig248/deepquantiles/master/README_pics/mdn.png)\n\nSame trick is useed to optimize the \"pinball\" loss in quantile regression networks, and in fact can be used to optimize an arbitrary loss function of `(X, y, y_hat)`.\n\nWithin the quantile-based approach, we further explore:\na. fitting a separate model to predict each quantile\nb. fitting a multi-output network to predict multiple quantiles simultaneously\nc. learning a regression on `X` and `q` simultanesously, thus effectively\nlearning the complete (conditional) cumulative density function.\n\n\n## Installation\nInstall package from source:\n\n```\npip install git+https://github.com/ig248/deepquantiles\n```\n\nOr from PyPi:\n\n```\npip install deepquantiles\n```\n## Usage\n```\nfrom deepquantiles import MultiQuantileRegressor, InverseCDFRegressor, MixtureDensityRegressor\n```\nAs this package is largely an experiment, please explore the Jupyter notebooks and expect to look at the source code.\n\n## Content\n- `deepqunatiles.regressors`: implementation of core algorithms\n- `deepquantiles.presets`: a collection of pre-configured estimators and settings used in experiments\n- `deepquantiles.datasets`: functions used for generating test data\n- `deepquantiles.nb_utils`: helper functions used in notebooks\n- `notebooks`: Jupyter notebooks with examples and experiments\n\n## Tests\n\nRun\n```bash\nmake dev-install\nmake lint\nmake test\n```\n\n## References\n**Mixture Density Networks**, Christopher M. Bishop, [NCRG/94/004 (1994)](https://publications.aston.ac.uk/373/1/NCRG_94_004.pdf)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ig248/deepquantiles", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "deepquantiles", "package_url": "https://pypi.org/project/deepquantiles/", "platform": "", "project_url": "https://pypi.org/project/deepquantiles/", "project_urls": { "Homepage": "https://github.com/ig248/deepquantiles" }, "release_url": "https://pypi.org/project/deepquantiles/0.0.2/", "requires_dist": [ "keras", "scikit-learn" ], "requires_python": "", "summary": "Deep Continuous Quantile Regression", "version": "0.0.2" }, "last_serial": 4859524, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "0d8d6b5b22ca27320363c314268a9118", "sha256": "b38f899fee424729ac2310eda3ee9ba55e59954ed03f0d942e56a5f350b7f170" }, "downloads": -1, "filename": "deepquantiles-0.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d8d6b5b22ca27320363c314268a9118", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11660, "upload_time": "2019-02-16T18:07:09", "url": "https://files.pythonhosted.org/packages/4e/cb/8c72f4a82208d04610949bd5394f8db2c31e7c01f69f0b843796bd196675/deepquantiles-0.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a73547c72cf6f27994da19dbaba248c", "sha256": "9e8d419b3a91d17fe0fe428a1d3ab6e418c27429796e694d855ebdf782121fde" }, "downloads": -1, "filename": "deepquantiles-0.0.0.tar.gz", "has_sig": false, "md5_digest": "6a73547c72cf6f27994da19dbaba248c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9164, "upload_time": "2019-02-16T18:07:11", "url": "https://files.pythonhosted.org/packages/c6/d7/12c742f3e161307412b7f843a319f163d4bbd7f32dfe58d86c201d9b39f7/deepquantiles-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "76d31348a40f27e865d1b28a768e7fb6", "sha256": "beedd3ea7ecc1564862bc48001cd67c1eff8c4e6c69c9d319cb5bc23d92c325b" }, "downloads": -1, "filename": "deepquantiles-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "76d31348a40f27e865d1b28a768e7fb6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11660, "upload_time": "2019-02-16T18:09:23", "url": "https://files.pythonhosted.org/packages/ce/47/9b573a595e5259b97e453153344e1bd39470ab2a500343df8b2cf5ffd039/deepquantiles-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdc38230b957658030ecbfdc6e596511", "sha256": "ac0e80171714e93d30216f3800b419b651282c781f4a4fb7192baa50c5c433d5" }, "downloads": -1, "filename": "deepquantiles-0.0.1.tar.gz", "has_sig": false, "md5_digest": "fdc38230b957658030ecbfdc6e596511", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9160, "upload_time": "2019-02-16T18:09:25", "url": "https://files.pythonhosted.org/packages/c9/7d/7793aa04260fca74e5557db053b46367d8ff5334d84879345a65a77d4be9/deepquantiles-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "109ad89698838a67d1de51c37ad846fe", "sha256": "a80aa4a121cf23477f8d235a8fcfe0ddb6ae664b21baed5b37315b5f9413aed7" }, "downloads": -1, "filename": "deepquantiles-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "109ad89698838a67d1de51c37ad846fe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12042, "upload_time": "2019-02-23T23:43:22", "url": "https://files.pythonhosted.org/packages/ec/44/954fb3dcdde500d3b7ab7cae302c11d36179ff9d116a88d5c8178e8f38ad/deepquantiles-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49a0bd35b040d95e485ff8ac1267945d", "sha256": "91023eec0c9745f34b0fa558b4090aceac4fbe3454836f7c3d45e55ae0dbb0fa" }, "downloads": -1, "filename": "deepquantiles-0.0.2.tar.gz", "has_sig": false, "md5_digest": "49a0bd35b040d95e485ff8ac1267945d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9898, "upload_time": "2019-02-23T23:43:23", "url": "https://files.pythonhosted.org/packages/e1/73/49fb5e90c7176393690020fb2a3d9b4b852ea451ff850fa49855c00ae8e0/deepquantiles-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "109ad89698838a67d1de51c37ad846fe", "sha256": "a80aa4a121cf23477f8d235a8fcfe0ddb6ae664b21baed5b37315b5f9413aed7" }, "downloads": -1, "filename": "deepquantiles-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "109ad89698838a67d1de51c37ad846fe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12042, "upload_time": "2019-02-23T23:43:22", "url": "https://files.pythonhosted.org/packages/ec/44/954fb3dcdde500d3b7ab7cae302c11d36179ff9d116a88d5c8178e8f38ad/deepquantiles-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49a0bd35b040d95e485ff8ac1267945d", "sha256": "91023eec0c9745f34b0fa558b4090aceac4fbe3454836f7c3d45e55ae0dbb0fa" }, "downloads": -1, "filename": "deepquantiles-0.0.2.tar.gz", "has_sig": false, "md5_digest": "49a0bd35b040d95e485ff8ac1267945d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9898, "upload_time": "2019-02-23T23:43:23", "url": "https://files.pythonhosted.org/packages/e1/73/49fb5e90c7176393690020fb2a3d9b4b852ea451ff850fa49855c00ae8e0/deepquantiles-0.0.2.tar.gz" } ] }