{"id":23515156,"url":"https://github.com/htjb/tension-networks","last_synced_at":"2025-05-13T21:17:48.974Z","repository":{"id":249843609,"uuid":"704538924","full_name":"htjb/tension-networks","owner":"htjb","description":"Code for tension networks project.","archived":false,"fork":false,"pushed_at":"2024-08-08T12:04:43.000Z","size":1383848,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T21:44:48.857Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/htjb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-13T13:26:31.000Z","updated_at":"2024-08-08T12:04:47.000Z","dependencies_parsed_at":"2024-08-05T18:00:54.586Z","dependency_job_id":null,"html_url":"https://github.com/htjb/tension-networks","commit_stats":null,"previous_names":["htjb/tension-networks"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htjb%2Ftension-networks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htjb%2Ftension-networks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htjb%2Ftension-networks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htjb%2Ftension-networks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htjb","download_url":"https://codeload.github.com/htjb/tension-networks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254029023,"owners_count":22002284,"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":[],"created_at":"2024-12-25T14:13:01.849Z","updated_at":"2025-05-13T21:17:43.960Z","avatar_url":"https://github.com/htjb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tensionnet\n----------\n\nCode for Bevins, Handley, Gessey-Jones, [Calibrating Bayesian Tension Statistics using Neural Ratio Estimation](https://arxiv.org/abs/2407.15478), 2024.\n\nWhen the inference from two expeiments disgrees this is known as tension.\nUnderstanding and properly quantifying tension helps us to better understand\nany systematics in our analysis and identify whether new physics is needed\nto explain the observed phemonena. A number of tensions have kept researchers\nbusy in recent years including the Hubble tension and the $\\sigma_8$ tension.\n\nA Bayesian way to quantify tension is with the ratio \n\n$R = \\frac{P(D_A, D_B)}{P(D_A)P(D_B)} = \\frac{Z_{AB}}{Z_{A}Z_{B}}$\n\nwhere $D_A$ is the data from experiment $A$, $D_B$ is the data from experiment $B$,\n$Z_{AB}$ is the Bayesian evidence for the joint data set and $Z_{A}$\nand $Z_{B}$ are the Bayesian evidences for the individual data sets. $R$ is\noften very costly to calcualte since it involves evaluating three different evidences\nand it is also hard to interpret because it has a non-trivial prior dependence.\n\nWe demonstrate that Neural Ratio Estimation can be used to calcualte the bayesian\ntension statistics $R = \\frac{P(D_A, D_B)}{P(D_A)P(D_B)}$ if properly\ntrained on simulations of two experiments observables. We then show that NREs can be used to predict the plausible distribution of $R$ given some prior and model choice for two data sets with common parameters. This inconcordance $\\log R$ distribution can then\nbe used for calibrating the observed $R$ value for the real data into a prior independent\n$N \\sigma$ estimate of tension where here $\\sigma$ refers to the standard deviation of the\nstandard normal distribution.\n\n\nCitation\n--------\n\nIf you use the tensionnet work in any of your papers please cite the paper\n[Calibrating Bayesian Tension Statistics using Neural Ratio Estimation](https://arxiv.org/abs/2407.15478).\n\n```bibtex\n@ARTICLE{2024arXiv240715478B,\n       author = {{Bevins}, Harry T.~J. and {Handley}, William J. and {Gessey-Jones}, Thomas},\n        title = \"{Calibrating Bayesian Tension Statistics using Neural Ratio Estimation}\",\n      journal = {arXiv e-prints},\n     keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics},\n         year = 2024,\n        month = jul,\n          eid = {arXiv:2407.15478},\n        pages = {arXiv:2407.15478},\narchivePrefix = {arXiv},\n       eprint = {2407.15478},\n primaryClass = {astro-ph.CO},\n       adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240715478B},\n      adsnote = {Provided by the SAO/NASA Astrophysics Data System}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtjb%2Ftension-networks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtjb%2Ftension-networks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtjb%2Ftension-networks/lists"}