| 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 ranRan 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 |
| 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 |
| 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 |