SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.11754 · 2023

A Bayesian Spatial Model to Correct Under-Reporting in Urban Crowdsourcing

arXiv · PDF · Open in the Atlas

Code that ran

18 of 21 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; 2 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 14 failures of our instrument; 3 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/2312.11754.json · badge: /api/ran/2312.11754.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
gsagostini/networks_underreporting canonical (classifier label)
classifier basis: census
18 ran · 3 no recorded run
FunctionStatusWhere it lives
assess_equity_of_inspections Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gsagostini/networks_underreporting/d03_src/evaluate_equity.py
code served (permissive licence) · get_code("6d9528d74ceea0aa")
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 dict. 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 numpy as np
import pandas as pd
from scipy.stats import rankdata

# Create small sample data
np.random.seed(0)

# Number of nodes
n_nodes = 10
n_models = 2

# Create scores: 2D array (n_nodes x n_models)
scores = np.random.rand(n_nodes, n_models)

# Create training_reports: binary array
training_reports = np.random.randint(0, 2, size=n_nodes)

# Capacity as a fraction
capacity = 0.3

# weight_ties as boolean
weight_ties = True

# model_names
model_names = ["Model_A", "Model_B"]

# node_weights: 2D array where each column is a demographic group
# Shape: (n_nodes, n_demographic_groups)
node_weights = np.random.rand(n_nodes, 3)

# node_categories: list of category labels for each node
node_categories = np.random.choice(["low_income", "high_income", "medium_income"], size=n_nodes)

# node_weights_names: names for the demographic groups
node_weights_names = ["Group_1", "Group_2", "Group_3"]

ARGS = {
    "scores": scores,
    "training_reports": training_reports,
    "capacity": capacity,
    "weight_ties": weight_ties,
    "model_names": model_names,
    "node_weights": node_weights,
    "node_categories": node_categories,
    "node_weights_names": node_weights_names
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
combine_posteriors Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_pooling.py
code served (permissive licence) · get_code("1efcec9cbec7afd4")
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 numpy as np
from scipy import stats

# Define prior as a simple Gaussian PDF
def prior(x):
    return stats.norm.pdf(x, loc=0, scale=1)

# Define multiple posteriors as simple Gaussian PDFs with different means
def posterior1(x):
    return stats.norm.pdf(x, loc=1, scale=0.5)

def posterior2(x):
    return stats.norm.pdf(x, loc=1.2, scale=0.6)

def posterior3(x):
    return stats.norm.pdf(x, loc=0.9, scale=0.55)

# Create array of posterior functions
posteriors = np.array([posterior1, posterior2, posterior3])

ARGS = {
    "posteriors": posteriors,
    "prior": prior
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
evaluate_improvement Ran
ran, honoured the contract we drafted
gsagostini/networks_underreporting/d03_src/evaluate_utils.py
code served (permissive licence) · get_code("d0536ebc53dfe889")
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 DataFrame. 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 numpy as np
import pandas as pd

# Create bootstrap estimates for multiple models and metrics
# Shape should be N_bootstrap x N_models for each metric

np.random.seed(0)

# 3 bootstrap samples, 2 models
bootstrap_samples = 3
n_models = 2

# Create synthetic bootstrap estimates for different metrics
accuracy_estimates = np.random.rand(bootstrap_samples, n_models) * 0.2 + 0.8  # ~80-100%
mse_estimates = np.random.rand(bootstrap_samples, n_models) * 0.1 + 0.05  # ~5-15%
rmse_estimates = np.sqrt(mse_estimates)

estimates_dictionary = {
    'Accuracy': accuracy_estimates,
    'MSE': mse_estimates,
    'RMSE': rmse_estimates,
}

model_names = ['ModelA', 'ModelB']

ARGS = {
    'estimates_dictionary': estimates_dictionary,
    'confidence_level': 0.95,
    'all_pairs': True,
    'model_names': model_names,
    'pval_method': 'one-sided',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
fit_normal_pdf_to_samples Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_pooling.py
code served (permissive licence) · get_code("9cbfc3a586a854a2")
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 numpy as np
import scipy.stats as stats

# Generate sample data from a normal distribution
np.random.seed(42)
samples = np.random.normal(loc=5.0, scale=2.0, size=1000)

ARGS = {
    "samples": samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
generate_graph_grid Ran
ran, honoured the contract we drafted
gsagostini/networks_underreporting/d03_src/process_graph.py
code served (permissive licence) · get_code("f903f90d1a598f1f")
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 Graph. 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 networkx as nx

ARGS = {
    "grid_size": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph output the recorded ndim 1 and dtype family int 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
generate_plots_dist_per_graph Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/process_prior.py
code served (permissive licence) · get_code("fd973d9b1fd5f1e6")
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 ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was 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 numpy as np
import matplotlib.pyplot as plt

# Set random seed for reproducibility
np.random.seed(0)

# Create a dictionary with (theta_0, theta_1) tuples as keys
# and numpy arrays as values
dictionary = {
    (0.1, 0.5): np.random.randn(2, 8),  # shape (2, 8) - 2 samples, 8 features
    (0.1, 0.7): np.random.randn(2, 8),
    (0.3, 0.5): np.random.randn(2, 8),
    (0.3, 0.7): np.random.randn(2, 8),
    (0.5, 0.5): np.random.randn(2, 8),
    (0.5, 0.7): np.random.randn(2, 8),
}

# Define ARGS with all parameters for generate_plots_dist_per_graph
ARGS = {
    "dictionary": dictionary,
    "possible_theta_0": None,  # Will use all available theta_0 values
    "possible_theta_1": None,  # Will use all available theta_1 values
    "leg_all": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, seaborn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) 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
get_combined_posterior_from_samples Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_pooling.py
code served (permissive licence) · get_code("96192a04d0fe7849")
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 tuple. 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 numpy as np
import scipy.stats as stats

# Generate sample data for multiple posteriors
np.random.seed(0)

# Create 3 different sample lists, each representing posterior samples
# from different observations
samples_list = [
    np.random.normal(loc=0.5, scale=0.3, size=100).tolist(),
    np.random.normal(loc=0.7, scale=0.4, size=120).tolist(),
    np.random.normal(loc=0.3, scale=0.25, size=80).tolist(),
]

ARGS = {
    'samples_list': samples_list,
    'prior_mean': 0.0,
    'prior_std': 1.0,
    'estimate_type': 'mean',
    'CI_alpha': 0.95,
    'return_pdf': False,
    'plot': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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_inspection_count Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/evaluate_equity.py
code served (permissive licence) · get_code("ae45c2afda2669db")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

# Test case 1: Basic case with just inspections (no weights, no categories)
inspections_1 = np.array([1.0, 0.5, 1.0, 0.0])

# Test case 2: With 1D weights
weights_1d = np.array([10.0, 20.0, 15.0, 5.0])

# Test case 3: With 2D weights (multiple demographic groups)
weights_2d = np.array([
    [10.0, 100.0],
    [20.0, 200.0],
    [15.0, 150.0],
    [5.0, 50.0]
])

# Test case 4: With categories
categories = ['low', 'high', 'low', 'high']

# Group names for demographic groups
group_names = np.array(['urban', 'rural'])

# Use the basic case for the primary ARGS
ARGS = {
    'inspections': np.array([1.0, 0.5, 1.0, 0.0]),
    'weights': None,
    'categories': None,
    'group_names': None
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
get_inspection_status Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gsagostini/networks_underreporting/d03_src/evaluate_equity.py
code served (permissive licence) · get_code("44571b731a908087")
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 ndarray, ndim 1, dtype family float, shape (5,) as a later run recorded it. The image it ran in was 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 numpy as np
from scipy.stats import rankdata

# Test basic case: simple scores list
scores_basic = [0.9, 0.2, 0.7, 0.5, 0.8]

# Test case with ties
scores_with_ties = [0.9, 0.5, 0.5, 0.5, 0.3]

# Test case: small list
scores_small = [0.8, 0.3, 0.6]

# Test case: all same values (all tied)
scores_all_tied = [0.5, 0.5, 0.5, 0.5]

# Use basic scores as primary test case
ARGS = {
    "scores": scores_basic,
    "capacity": 3,
    "weight_ties": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
get_means_and_keys Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/process_prior.py
code served (permissive licence) · get_code("8a4cdf17e1d72379")
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 tuple. 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
import numpy as np

torch.manual_seed(0)

# The function expects a dictionary where:
# - keys are tuples of (theta_0, theta_1) parameters
# - values are numpy arrays or array-like objects with a .mean(axis=1) method

# Create sample data: small numpy arrays (2 samples, 4 features)
A1 = np.random.randn(2, 4)
A2 = np.random.randn(2, 4)
A3 = np.random.randn(2, 4)
A4 = np.random.randn(2, 4)

# Build the dictionary with tuple keys containing theta parameters
dictionary = {
    (0.1, 0.5): A1,
    (0.1, 0.7): A2,
    (0.3, 0.5): A3,
    (0.3, 0.7): A4,
}

ARGS = {
    "dictionary": dictionary,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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_trivial_probability Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_baselines.py
code served (permissive licence) · get_code("a14c496a2abc7088")
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 ndarray, ndim 1, dtype family float, shape (5,) as a later run recorded it. The image it ran in was 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 numpy as np
import networkx as nx

# Create a small graph with 5 nodes
graph = nx.Graph()
graph.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4), (0, 4)])

# Create a report array T with shape (5,)
# Values are 0 or 1 indicating whether a report exists
T = np.array([1, 0, 1, 0, 0], dtype=np.float64)

# Define ARGS dictionary with all required parameters
ARGS = {
    "T": T,
    "graph": graph,
    "fix_reported_nodes": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
initialize_AN Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_MCMC.py
code served (permissive licence) · get_code("c1faeb1d6c219ebb")
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 tuple. 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 numpy as np
import networkx as nx

# Create a small graph object
graph = nx.Graph()
graph.add_edges_from([(0, 1), (1, 2), (2, 3)])

ARGS = {
    "graph": graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
initialize_MCMC Ran
ran on a synthesized input
gsagostini/networks_underreporting/d03_src/model_MCMC.py
code served (permissive licence) · get_code("94269ba8fe1e8928")
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 tuple. 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 numpy as np
import networkx as nx

# Create a small graph with 5 nodes
graph = nx.karate_club_graph()
# Relabel nodes to be 0...N-1
graph = nx.relabel_nodes(graph, {i: i for i in range(graph.order())})

# Create small covariates array: N x M where N=number of nodes, M=2 covariates
N = graph.order()
covariates = np.random.randn(N, 2)

# Create fixed T array for when fixed_T=True
fixed_T_array = np.random.randint(0, 2, size=N)

# Create fixed params dict for when fixed_params=True
fixed_params_dict = {
    'alpha0': np.random.random(),
    'alpha1': np.random.random(),
    'alpha2': np.random.random(),
    'theta0': -np.exp(np.random.normal(scale=0.5)),
    'theta1': np.exp(np.random.normal(scale=0.5))
}

# Create starting params dict for initialization
starting_params_dict = {
    'alpha0': np.random.random(),
    'alpha1': np.random.random(),
    'alpha2': np.random.random(),
    'theta0': -np.exp(np.random.normal(scale=0.5)),
    'theta1': np.exp(np.random.normal(scale=0.5))
}

ARGS = {
    'graph': graph,
    'covariates': covariates,
    'fixed_T': False,
    'fixed_params': False,
    'T': None,
    'params': None,
    'starting_params': starting_params_dict,
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
process_complaints Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/process_complaints.py
code served (permissive licence) · get_code("b8a73b0bb355b4a9")
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 ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was 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 pandas as pd
import numpy as np

# Create a small DataFrame
df = pd.DataFrame({
    'id': [1, 2, 3, 4],
    'name': ['A', 'B', 'C', 'D']
})

# Create a complaints series with some values and NaNs
complaints_series = pd.Series([5.0, np.nan, 2.0, 0.0])

ARGS = {
    'df': df,
    'complaints_series': complaints_series,
    'column_name': 'complaints',
    'binary': True
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) 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
sample_SVE Ran
ran on a synthesized input
gsagostini/networks_underreporting/d03_src/model_SVEA.py
code served (permissive licence) · get_code("1e9d355db10b8dd0")
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 ndarray, ndim 2, dtype family float, shape (101, 2) as a later run recorded it. The image it ran in was 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 numpy as np
import networkx as nx

# Create a small graph with 4 nodes
graph = nx.Graph()
graph.add_edges_from([(0, 1), (1, 2), (2, 3), (0, 3)])

# Create a graph adjacency matrix
graph_matrix = nx.adjacency_matrix(graph).toarray()

# Create a true assignment (spin values: +1 or -1)
# Must have both +1 and -1 values for the function
A = np.array([1, -1, 1, -1])

# Parameters for the function
n_iterations = 100
theta_start = [0.0, 0.3]
proposal_sigma = 0.2
prior_mean = [0.0, 0.3]
prior_sigma = [0.2, 0.1]
n_iterations_aux = 20
use_Gibbs_aux = False
debug = False
return_acceptance_rate = False

ARGS = {
    'graph': graph,
    'A': A,
    'n_iterations': n_iterations,
    'theta_start': theta_start,
    'proposal_sigma': proposal_sigma,
    'prior_mean': prior_mean,
    'prior_sigma': prior_sigma,
    'n_iterations_aux': n_iterations_aux,
    'use_Gibbs_aux': use_Gibbs_aux,
    'debug': debug,
    'return_acceptance_rate': return_acceptance_rate
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (101, 2) — shape (101, 2) 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
sample_from_ising Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gsagostini/networks_underreporting/d03_src/model_SVEA.py
code served (permissive licence) · get_code("71be365363b42841")
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 ndarray, ndim 1, dtype family int, shape (5,) as a later run recorded it. The image it ran in was 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 numpy as np
import networkx as nx

# Create a small graph with 5 nodes
graph = nx.Graph()
graph.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)])

# Define theta parameters (field and coupling)
theta = np.array([0.5, 0.3])

# Create starting configuration (5 spins, each +1 or -1)
starting_A = np.array([1, -1, 1, -1, 1])

ARGS = {
    "graph": graph,
    "theta": theta,
    "starting_A": starting_A,
    "n_iterations": 10,
    "use_Gibbs": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) 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
sample_ising_Gibbs Ran
ran; our contract draft was wrong, not the code
gsagostini/networks_underreporting/d03_src/model_SVEA.py
code served (permissive licence) · get_code("02490ec7f099eb85")
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 ndarray, ndim 1, dtype family int, shape (4,) as a later run recorded it. The image it ran in was 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 numpy as np
import networkx as nx

# Create a small graph for testing
# The function calls graph.order() to get number of nodes
# and graph.neighbors(node) to get neighbors of each node
graph = nx.Graph()
graph.add_edges_from([(0, 1), (1, 2), (2, 3), (3, 0)])

# theta parameter: used as theta[0] and theta[1] in sample_single_A
theta = np.array([0.5, 0.3])

# starting_A: initial state, should be array-like with length equal to number of nodes
starting_A = np.array([1, -1, 1, -1])

# n_iterations: number of Gibbs sampling iterations
n_iterations = 10

# return_all: whether to return all iterations or just final state
return_all = False

ARGS = {
    'graph': graph,
    'theta': theta,
    'starting_A': starting_A,
    'n_iterations': n_iterations,
    'return_all': return_all
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (4,) — shape (4,) 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
show_samples Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gsagostini/networks_underreporting/d03_src/evaluate_visualization.py
code served (permissive licence) · get_code("693fed40e010185e")
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 ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was 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 numpy as np
import matplotlib
matplotlib.use('Agg')  # Use non-interactive backend
import matplotlib.pyplot as plt

# Create sample data for sampled_A and sampled_T
# The function expects these to be array-like that can be converted to numpy arrays
# and compared with == 1, then displayed with imshow

# sampled_A: a small matrix where we can have values 0 and 1
sampled_A = np.array([
    [1, 0, 1, 0],
    [0, 1, 1, 0],
    [1, 1, 0, 1]
])

# sampled_T: another small matrix similar structure
sampled_T = np.array([
    [0, 1, 0, 1],
    [1, 0, 0, 1],
    [0, 1, 1, 0]
])

# size parameter for figure
size = (11, 20)

ARGS = {
    'sampled_A': sampled_A,
    'sampled_T': sampled_T,
    'size': size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) 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
evaluate_performance Not yet run
unverified (harvested, no recorded run)
gsagostini/networks_underreporting/d03_src/evaluate_utils.py
code served (permissive licence) · get_code("2196c5ac030bd5c6")
How it ran

no invocation recorded.

get_GP_probability Not yet run
unverified (harvested, no recorded run)
gsagostini/networks_underreporting/d03_src/model_baselines.py
code served (permissive licence) · get_code("05dd8459251c2af8")
How it ran

no invocation recorded.

plot_heatmap Not yet run
unverified (harvested, no recorded run)
gsagostini/networks_underreporting/d03_src/process_prior.py
code served (permissive licence) · get_code("c6067f15bc76c0b7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 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 21 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

Decision-makers often observe the occurrence of events through a reporting process. City governments, for example, rely on resident reports to find and then resolve urban infrastructural problems such as fallen street trees, flooded basements, or rat infestations. Without additional assumptions, there is no way to distinguish events that occur but are not reported from events that truly did not occur--a fundamental problem in settings with positive-unlabeled data. Because disparities in reporting rates correlate with resident demographics, addressing incidents only on the basis of reports leads to systematic neglect in neighborhoods that are less likely to report events. We show how to overcome this challenge by leveraging the fact that events are spatially correlated. Our framework uses a Bayesian spatial latent variable model to infer event occurrence probabilities and applies it to storm-induced flooding reports in New York City, further pooling results across multiple storms. We show that a model accounting for under-reporting and spatial correlation predicts future reports more accurately than other models, and further induces a more equitable set of inspections: its allocations better reflect the population and provide equitable service to non-white, less traditionally educated, and lower-income residents. This finding reflects heterogeneous reporting behavior learned by the model: reporting rates are higher in Census tracts with higher populations, proportions of white residents, and proportions of owner-occupied households. Our work lays the groundwork for more equitable proactive government services, even with disparate reporting behavior.

For agents

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

get_harvested_code_for_paper("2312.11754")
get_code_for_paper("2312.11754")
have("2312.11754")

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

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

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

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

Connect an agent — have() is free.