{"id":21287581,"url":"https://github.com/saattrupdan/doubt","last_synced_at":"2025-09-12T04:32:55.521Z","repository":{"id":37202698,"uuid":"251078964","full_name":"saattrupdan/doubt","owner":"saattrupdan","description":"Bringing back uncertainty to machine learning.","archived":false,"fork":false,"pushed_at":"2024-06-10T08:31:42.000Z","size":2393,"stargazers_count":50,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-04T12:11:43.712Z","etag":null,"topics":["bootstrap","confidence-intervals","machine-learning","prediction-intervals","quantile-regression","quantile-regression-forests","uncertainty"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saattrupdan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-29T16:31:15.000Z","updated_at":"2024-06-10T08:31:45.000Z","dependencies_parsed_at":"2024-06-10T10:14:10.676Z","dependency_job_id":"dce41155-fbec-4895-9127-c41e8cba0138","html_url":"https://github.com/saattrupdan/doubt","commit_stats":{"total_commits":390,"total_committers":8,"mean_commits":48.75,"dds":"0.42051282051282046","last_synced_commit":"04c997ac05dbd4fceec5109dc2eee3d5cdf8e9a9"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saattrupdan%2Fdoubt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saattrupdan%2Fdoubt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saattrupdan%2Fdoubt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saattrupdan%2Fdoubt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saattrupdan","download_url":"https://codeload.github.com/saattrupdan/doubt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229856092,"owners_count":18134840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","confidence-intervals","machine-learning","prediction-intervals","quantile-regression","quantile-regression-forests","uncertainty"],"created_at":"2024-11-21T12:13:54.348Z","updated_at":"2024-12-15T18:11:14.672Z","avatar_url":"https://github.com/saattrupdan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doubt\n\n*Bringing back uncertainty to machine learning.*\n\n______________________________________________________________________\n[![PyPI Status](https://badge.fury.io/py/doubt.svg)](https://pypi.org/project/doubt/)\n[![Documentation](https://img.shields.io/badge/docs-passing-green)](https://saattrupdan.github.io/doubt/doubt.html)\n[![License](https://img.shields.io/github/license/saattrupdan/doubt)](https://github.com/saattrupdan/doubt/blob/main/LICENSE)\n[![LastCommit](https://img.shields.io/github/last-commit/saattrupdan/doubt)](https://github.com/saattrupdan/doubt/commits/main)\n[![Code Coverage](https://img.shields.io/badge/Coverage-66%25-yellow.svg)](https://github.com/saattrupdan/doubt/tree/dev/tests)\n[![Conference](https://img.shields.io/badge/Conference-AAAI23-blue)](https://doi.org/10.1609/aaai.v37i12.26755)\n\nA Python package to include prediction intervals in the predictions of machine\nlearning models, to quantify their uncertainty.\n\n\n## Installation\n\nYou can install `doubt` with `pip`:\n\n```shell\npip install doubt\n```\n\nIf you want to be able to use the preprocessed regression datasets as well, you install\nit with the `datasets` extra:\n\n```shell\npip install doubt[datasets]\n```\n\n\n## Features\n\n- Bootstrap wrapper for all Scikit-Learn models\n    - Can also be used to calculate usual bootstrapped statistics of a dataset\n- Quantile Regression for all generalised linear models\n- Quantile Regression Forests\n- A uniform dataset API, with 24 regression datasets and counting\n\n\n## Quick Start\n\nIf you already have a model in Scikit-Learn, then you can simply\nwrap it in a `Boot` to enable predicting with prediction intervals:\n\n```python\n\u003e\u003e\u003e from sklearn.linear_model import LinearRegression\n\u003e\u003e\u003e from doubt import Boot\n\u003e\u003e\u003e from doubt.datasets import PowerPlant\n\u003e\u003e\u003e\n\u003e\u003e\u003e X, y = PowerPlant().split()\n\u003e\u003e\u003e clf = Boot(LinearRegression())\n\u003e\u003e\u003e clf = clf.fit(X, y)\n\u003e\u003e\u003e clf.predict([10, 30, 1000, 50], uncertainty=0.05)\n(481.9203102126274, array([473.43314309, 490.0313962 ]))\n```\n\nAlternatively, you can use one of the standalone models with uncertainty\noutputs. For instance, a `QuantileRegressionForest`:\n\n```python\n\u003e\u003e\u003e from doubt import QuantileRegressionForest as QRF\n\u003e\u003e\u003e from doubt.datasets import Concrete\n\u003e\u003e\u003e import numpy as np\n\u003e\u003e\u003e\n\u003e\u003e\u003e X, y = Concrete().split()\n\u003e\u003e\u003e clf = QRF(max_leaf_nodes=8)\n\u003e\u003e\u003e clf.fit(X, y)\n\u003e\u003e\u003e clf.predict(np.ones(8), uncertainty=0.25)\n(16.933590347847982, array([ 8.93456428, 26.0664534 ]))\n```\n\n## Citation\n```\n@inproceedings{mougannielsen2023monitoring,\n  title={Monitoring Model Deterioration with Explainable Uncertainty Estimation via Non-parametric Bootstrap},\n  author={Mougan, Carlos and Nielsen, Dan Saattrup},\n  booktitle={AAAI Conference on Artificial Intelligence},\n  year={2023}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaattrupdan%2Fdoubt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaattrupdan%2Fdoubt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaattrupdan%2Fdoubt/lists"}