SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.04133 · 2021

Quantifying disparities in intimate partner violence: a machine learning method to correct for underreporting

arXiv · PDF · Open in the Atlas

Code that ran

4 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2110.04133.json · badge: /api/ran/2110.04133.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
epierson9/invisible-conditions canonical (classifier label)
classifier basis not recorded on the link
4 ran · 5 no recorded run
FunctionStatusWhere it lives
BCELoss_class_weighted Ran
ran on a synthesized input
epierson9/invisible-conditions/relative_prevalence_benchmark/method.py
code served (permissive licence) · get_code("2eb360ed86f68d05")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function BCELoss_class_weighted takes weights parameter
# which is used as weights[0] and weights[1] in the loss function
# So weights needs to be indexable with at least 2 elements

weights = torch.tensor([0.3, 0.7])

ARGS = {
    "weights": weights
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ids_with_icd_codes Ran
ran on a synthesized input
epierson9/invisible-conditions/MIMIC_notebooks/mimic_helper_fs.py
code served (permissive licence) · get_code("257ef4a76f36254b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a small diagnoses DataFrame
diagnoses_data = {
    'icd_code': ['E11.0', 'E11.65', 'I10', 'E10.1', 'J45.901', 'E11.22'],
    'patient_id': [1, 1, 2, 3, 2, 3],
    'encounter_id': [101, 102, 103, 104, 105, 106]
}
diagnoses = pd.DataFrame(diagnoses_data)

# Define parameters
id_type = 'patient_id'
codes = ['E11', 'I10']

ARGS = {
    'diagnoses': diagnoses,
    'id_type': id_type,
    'codes': codes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ids_with_kws Ran
ran on a synthesized input
epierson9/invisible-conditions/MIMIC_notebooks/mimic_helper_fs.py
code served (permissive licence) · get_code("0776ac86bdba8227")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np

# Create a small DataFrame with diagnosis data
data = {
    'diagnosis_id': [1, 2, 3, 4, 5],
    'patient_id': [101, 102, 103, 104, 105],
    'long_title': [
        'Type 2 Diabetes Mellitus',
        'Hypertension Essential',
        'Type 1 Diabetes with complications',
        'Coronary Artery Disease',
        'Chronic Kidney Disease Stage 3'
    ]
}

diagnoses = pd.DataFrame(data)

ARGS = {
    'diagnoses': diagnoses,
    'id_type': 'diagnosis_id',
    'kws': ['diabetes', 'kidney'],
    'descr_field': 'long_title'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_loss Ran
ran on a synthesized input
epierson9/invisible-conditions/relative_prevalence_benchmark/method.py
code served (permissive licence) · get_code("b0736ea8ef6ab93c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# s_true: should be a list/array that can be converted to a tensor
# The function converts it to torch.Tensor and moves to cuda
# BCELoss expects values in [0, 1] for binary cross entropy
s_true = [0.2, 0.8, 0.5, 0.9]

# s_pred: should be a tensor with sigmoid-like values in [0, 1]
# Same shape as s_true
s_pred = torch.sigmoid(torch.randn(4))

ARGS = {
    "s_true": s_true,
    "s_pred": s_pred,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cdmm Not yet run
unverified (harvested, no recorded run)
epierson9/invisible-conditions/relative_prevalence_benchmark/baselines.py
code served (permissive licence) · get_code("8b2054a92719c79a")
How it ran

no invocation recorded.

cdmm_get_prior Not yet run
unverified (harvested, no recorded run)
epierson9/invisible-conditions/relative_prevalence_benchmark/baselines.py
code served (permissive licence) · get_code("179a73c04956dee0")
How it ran

no invocation recorded.

get_group_idx_in_metadata Not yet run
unverified (harvested, no recorded run)
epierson9/invisible-conditions/WILDS_notebooks/cmod_helper_fs.py
code served (permissive licence) · get_code("b6bf67a8db7a5a9c")
How it ran

no invocation recorded.

get_idxs_not_of_group_cmod Not yet run
unverified (harvested, no recorded run)
epierson9/invisible-conditions/WILDS_notebooks/cmod_helper_fs.py
code served (permissive licence) · get_code("00d3205b7254432e")
How it ran

no invocation recorded.

get_idxs_of_group_cmod Not yet run
unverified (harvested, no recorded run)
epierson9/invisible-conditions/WILDS_notebooks/cmod_helper_fs.py
code served (permissive licence) · get_code("8198575acbe8a37d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Estimating the prevalence of a medical condition, or the proportion of the population in which it occurs, is a fundamental problem in healthcare and public health. Accurate estimates of the relative prevalence across groups -- capturing, for example, that a condition affects women more frequently than men -- facilitate effective and equitable health policy which prioritizes groups who are disproportionately affected by a condition. However, it is difficult to estimate relative prevalence when a medical condition is underreported. In this work, we provide a method for accurately estimating the relative prevalence of underreported medical conditions, building upon the positive unlabeled learning framework. We show that under the commonly made covariate shift assumption -- i.e., that the probability of having a disease conditional on symptoms remains constant across groups -- we can recover the relative prevalence, even without restrictive assumptions commonly made in positive unlabeled learning and even if it is impossible to recover the absolute prevalence. We conduct experiments on synthetic and real health data which demonstrate our method's ability to recover the relative prevalence more accurately than do baselines, and demonstrate the method's robustness to plausible violations of the covariate shift assumption. We conclude by illustrating the applicability of our method to case studies of intimate partner violence and hate speech.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2110.04133")
get_code_for_paper("2110.04133")
have("2110.04133")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2110.04133.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2110.04133.svg)](https://syntology.ai/paper/2110.04133)

Connect an agent — have() is free.