{"id":13578137,"url":"https://github.com/kundajelab/abstention","last_synced_at":"2026-01-27T07:11:06.059Z","repository":{"id":57407841,"uuid":"109888966","full_name":"kundajelab/abstention","owner":"kundajelab","description":"Algorithms for abstention, calibration and domain adaptation to label shift.","archived":false,"fork":false,"pushed_at":"2020-11-14T06:31:38.000Z","size":7832,"stargazers_count":37,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-18T22:57:50.481Z","etag":null,"topics":["abstention","calibration","domain-adaptation","label-shift","prior-probability-shift"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kundajelab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-07T20:46:52.000Z","updated_at":"2025-07-11T04:04:19.000Z","dependencies_parsed_at":"2022-09-26T17:10:20.501Z","dependency_job_id":null,"html_url":"https://github.com/kundajelab/abstention","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kundajelab/abstention","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2Fabstention","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2Fabstention/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2Fabstention/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2Fabstention/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kundajelab","download_url":"https://codeload.github.com/kundajelab/abstention/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kundajelab%2Fabstention/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: 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":["abstention","calibration","domain-adaptation","label-shift","prior-probability-shift"],"created_at":"2024-08-01T15:01:27.796Z","updated_at":"2026-01-27T07:11:06.044Z","avatar_url":"https://github.com/kundajelab.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Abstention, Calibration \u0026 Label Shift\n\nAlgorithms for abstention, calibration and domain adaptation to label shift. \n\nAssociated papers:\n\nShrikumar A\\*\u0026dagger;, Alexandari A\\*, Kundaje A\u0026dagger;, [A Flexible and Adaptive Framework for Abstention Under Class Imbalance](https://arxiv.org/abs/1802.07024)\n\nAlexandari A\\*, Kundaje A\u0026dagger;, Shrikumar A\\*\u0026dagger;, [Maximum Likelihood with Bias-Corrected Calibration is Hard-To-Beat at Label Shift Adaptation](https://arxiv.org/abs/1901.06852)\n\n*co-first authors\n\u0026dagger; co-corresponding authors\n\n## Examples\n\nSee [https://github.com/blindauth/abstention_experiments](https://github.com/blindauth/abstention_experiments) and [https://github.com/blindauth/labelshiftexperiments](https://github.com/blindauth/labelshiftexperiments) for colab notebooks reproducing the experiments in the papers. \n\n## Installation\n\n```\npip install abstention\n```\n\n## Algorithms implemented\n\nFor calibration:\n- Platt Scaling\n- Isotonic Regression\n- Temperature Scaling\n- Vector Scaling\n- Bias-Corrected Temperature Scaling\n- No-Bias Vector Scaling\n\nFor domain adaptation to label shift:\n- Expectation Maximization (Saerens et al., 2002)\n- Black-Box Shift Learning (BBSL) (Lipton et al., 2018)\n- Regularized Learning under Label Shifts (RLLS) (Azizzadenesheli et al., 2019)\n\nFor abstention:\n- Metric-specific abstention methods described in [A Flexible and Adaptive Framework for Abstention Under Class Imbalance](https://arxiv.org/abs/1802.07024), including abstention to optimize auROC, auPRC, sensitivity at a target specificity and weighted Cohen's Kappa\n- Jensen-Shannon Divergence from class priors\n- Entropy in the predicted class probabilities (Wan, 1990)\n- Probability of the highest-predicted class (Hendrycks \\\u0026 Gimpel, 2016)\n- The method of Fumera et al., 2000\n- See Colab notebook experiments in [https://github.com/blindauth/abstention_experiments](https://github.com/blindauth/abstention_experiments) for details on how to use the various abstention methods.\n\n## Contact\n\nIf you have any questions, please contact:\n\nAvanti Shrikumar: avanti [dot] shrikumar [at] gmail.com\n\nAmr Alexandari: amr [dot] alexandari [at] gmail.com\n\nAnshul Kundaje: akundaje [at] stanford [dot] edu\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkundajelab%2Fabstention","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkundajelab%2Fabstention","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkundajelab%2Fabstention/lists"}