Skip to main content

PyPI version Build Status Coverage Status

Deep Continuous Quantile Regression

This package explores different approaches to learning the uncertainty, and, 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`.

This is particularily important when

  • the mean of the target variable is not sufficient for the use case
  • the errors are heteroscedastic, i.e. vary depending on input features
  • the errors are skewed, making a single summary statistic such as variance inadequate.

We explore two main approches:

  1. fitting a mixture density model
  2. learning the location of conditional qunatiles, q, of the distribution.

Our mixture density network exploits an implementation trick to achieve negative-log-likelihood minimisation in keras.

Same 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).

Within the quantile-based approach, we further explore: a. fitting a separate model to predict each quantile b. fitting a multi-output network to predict multiple quantiles simultaneously c. learning a regression on X and q simultanesously, thus effectively learning the complete (conditional) cumulative density function.

Installation

Install package from source:

pip install git+https://github.com/ig248/deepquantiles

Or from PyPi:

pip install deepquantiles

Usage

from deepquantiles import MultiQuantileRegressor, InverseCDFRegressor, MixtureDensityRegressor

As this package is largely an experiment, please explore the Jupyter notebooks and expect to look at the source code.

Content

  • deepqunatiles.regressors: implementation of core algorithms
  • deepquantiles.presets: a collection of pre-configured estimators and settings used in experiments
  • deepquantiles.datasets: functions used for generating test data
  • deepquantiles.nb_utils: helper functions used in notebooks
  • notebooks: Jupyter notebooks with examples and experiments

Tests

Run

make dev-install
make lint
make test

References

Mixture Density Networks, Christopher M. Bishop, NCRG/94/004 (1994)

Metadata

Release files for deepquantiles 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepquantiles 0.0.2
File Size Uploaded Provenance
deepquantiles-0.0.2.tar.gz 9.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for deepquantiles 0.0.2
File Interpreter ABI Platform
deepquantiles-0.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 21.9 kB

Release files / deepquantiles-0.0.2.tar.gz

Download URL deepquantiles-0.0.2.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
91023eec0c9745f34b0fa558b4090aceac4fbe3454836f7c3d45e55ae0dbb0fa
BLAKE2b-256 checksum
How to use checksums
e17349fb5e90c7176393690020fb2a3d9b4b852ea451ff850fa49855c00ae8e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / deepquantiles-0.0.2-py2.py3-none-any.whl

Download URL deepquantiles-0.0.2-py2.py3-none-any.whl
Size 12.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a80aa4a121cf23477f8d235a8fcfe0ddb6ae664b21baed5b37315b5f9413aed7
BLAKE2b-256 checksum
How to use checksums
ec44954fb3dcdde500d3b7ab7cae302c11d36179ff9d116a88d5c8178e8f38ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Security for deepquantiles 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page