{"id":46978721,"url":"https://github.com/famura/binned-cdf","last_synced_at":"2026-03-11T12:55:04.607Z","repository":{"id":341370387,"uuid":"1098020197","full_name":"famura/binned-cdf","owner":"famura","description":"A PyTorch-based distribution parametrized by the logits of CDF bins ","archived":false,"fork":false,"pushed_at":"2026-03-01T11:03:30.000Z","size":2333,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T14:50:48.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/famura.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/codeowners","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-17T06:38:53.000Z","updated_at":"2026-03-01T10:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/famura/binned-cdf","commit_stats":null,"previous_names":["famura/binned-cdf"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/famura/binned-cdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fbinned-cdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fbinned-cdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fbinned-cdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fbinned-cdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/famura","download_url":"https://codeload.github.com/famura/binned-cdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fbinned-cdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30381951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-03-11T12:55:03.252Z","updated_at":"2026-03-11T12:55:04.580Z","avatar_url":"https://github.com/famura.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# binned-cdf\n\n[![License: CC-BY-4.0][license-badge]][license-url]\n![python][python-badge]\u003cspace\u003e\n[![Docs][docs-badge]][docs]\n[![CI][ci-badge]][ci]\n[![CD][cd-badge]][cd]\n[![Coverage][coverage-badge]][coverage]\n[![Tests][tests-badge]][tests]\n[![mkdocs-material][mkdocs-material-badge]][mkdocs-material]\n[![mypy][mypy-badge]][mypy]\n[![pre-commit][pre-commit-badge]][pre-commit]\n[![pytest][pytest-badge]][pytest]\n[![Ruff][ruff-badge]][ruff]\n[![uv][uv-badge]][uv]\n\nA PyTorch-based distribution parametrized by the logits of CDF bins\n\n## Background\n\nThe Cumulative Distribution Function (CDF) is a fundamental concept in probability theory and statistics that describes\nthe probability that a random variable $X$ takes on a value less than or equal to a given threshold $x$.\nFormally, the CDF is defined as $F(x) = P(X \\leq x)$, where $F(x)$ ranges from 0 to 1 as $x$ varies from negative to\npositive infinity.\nThe CDF provides a complete characterization of the probability distribution of a random variable:\nfor continuous distributions, it is the integral of the probability density function (PDF), while\nfor discrete distributions, it is the sum of probabilities up to and including $x$.\nKey properties of any CDF are the monotonicity and the boundary conditions\n$\\lim_{x \\to -\\infty} F(x) = 0$ and $\\lim_{x \\to \\infty} F(x) = 1$.\nCDFs are particularly useful for computing probabilities of intervals, quantiles, and for statistical inference.\n\n## Application to Machine Learning\n\nThis repository uses the CDF to model and learn flexible probability distributions in machine learning tasks.\nBy parameterizing the CDF with binned logits, it enables differentiable training and efficient sampling, making it\nsuitable for uncertainty estimation, probabilistic prediction, and distributional modeling in neural networks.\n\n## Implementation\n\nThe `BinnedLogitCDF` class inherits directly from `torch.distributions.Distribution`, implementing all necessary\nmethods plus some convenience functions.\nIt supports multi-dimensional batch shapes and CUDA devices.\nThe bins can be initialized linearly or log-spaced.\n\n`torch\u003e=2.7` it the only non-dev dependency of this repo.\n\n:point_right: **Please have a look at the [documentation][docs] to get started.**\n\n\u003c!-- URLs --\u003e\n[cd-badge]: https://github.com/famura/binned-cdf/actions/workflows/cd.yaml/badge.svg\n[cd]: https://github.com/famura/binned-cdf/actions/workflows/cd.yaml\n[ci-badge]: https://github.com/famura/binned-cdf/actions/workflows/ci.yaml/badge.svg\n[ci]: https://github.com/famura/binned-cdf/actions/workflows/ci.yaml\n[coverage-badge]: https://famura.github.io/binned-cdf/latest/exported/coverage/badge.svg\n[coverage]: https://famura.github.io/binned-cdf/latest/exported/coverage/index.html\n[docs-badge]: https://img.shields.io/badge/Docs-gh--pages-informational\n[docs]: https://famura.github.io/binned-cdf\n[license-badge]: https://img.shields.io/badge/License-CC--BY--4.0%20-blue.svg\n[license-url]: https://creativecommons.org/licenses/by/4.0\n[mkdocs-material-badge]: https://img.shields.io/badge/Material_for_MkDocs-526CFE?logo=MaterialForMkDocs\u0026logoColor=white\n[mkdocs-material]: https://github.com/squidfunk/mkdocs-material\n[mypy-badge]: https://www.mypy-lang.org/static/mypy_badge.svg\n[mypy]: https://github.com/python/mypy\n[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[pytest-badge]: https://img.shields.io/badge/Pytest-green?logo=pytest\n[pytest]: https://github.com/pytest-dev/pytest\n[python-badge]: https://img.shields.io/badge/python-3.11%20|3.12%20|%203.13-informational?logo=python\u0026logoColor=ffdd54\n[ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n[ruff]: https://docs.astral.sh/ruff\n[tests-badge]: https://famura.github.io/binned-cdf/latest/exported/tests/badge.svg\n[tests]: https://famura.github.io/binned-cdf/latest/exported/tests/index.html\n[uv-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json\n[uv]: https://docs.astral.sh/uv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamura%2Fbinned-cdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffamura%2Fbinned-cdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamura%2Fbinned-cdf/lists"}