SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.02732 · 2023

Conformal Prediction with Missing Values

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 10 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2306.02732.json · badge: /api/ran/2306.02732.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
mzaffran/conformalpredictionmissingvalues canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
generate_data Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/generation.py
code served (permissive licence) · get_code("2f4cd90bdd887e3f")
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 random
import numpy as np

ARGS = {
    'n': 100,
    'dim': 3,
    'params_reg': {
        'regression': 'Linear',
        'mean': 0.5,
        'phi': 0.7,
        'beta': np.array([1.0, 2.0, 3.0])
    },
    'params_noise': {
        'noise': 'Gaussian',
        'mean': 0.0,
        'scale': 0.5
    },
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
generate_split Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/generation.py
code served (permissive licence) · get_code("58e912048123bae6")
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, ndim 1, 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 random
import numpy as np
import copy

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

# Create a small dataset
n_samples = 20
n_features = 4
X = np.random.randn(n_samples, n_features).astype(np.float32)
Y = np.random.randint(0, 2, n_samples)

data = {
    'X': X,
    'Y': Y
}

# Define split sizes
train_size = 5
cal_size = 3

# Define test parameters
params_test = {
    'test_size': [4, 6],
    'mechanisms_test': ['iid'],
    'iid': {
        'test_size': 999  # Different from actual test sizes to avoid assertion
    },
    'worst_pattern': {
        'test_size': 999
    },
    'best_pattern': {
        'test_size': 999
    },
    'fixed_nb_sample_pattern': {
        'test_size': 999,
        'nb_sample_pattern': 2
    },
    'fixed_nb_sample_pattern_size': {
        'test_size': 999,
        'nb_sample_pattern': 2
    }
}

ARGS = {
    'train_size': train_size,
    'cal_size': cal_size,
    'params_test': params_test,
    'data': data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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_name_data Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/files.py
code served (permissive licence) · get_code("671448959e96134e")
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 str. 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

# Set up parameters for get_name_data function
train_size = 100
cal_size = 50
test_size_list = [25, 30]
params_test = {'test_size': test_size_list}

dim = 3
beta_values = np.array([1.0, 1.0, 1.0])
params_reg = {
    'regression': 'Linear',
    'mean': 1.0,
    'scale': 1.0,
    'beta': beta_values
}

params_noise = {
    'noise': 'Gaussian'
}

params_missing = {
    'prob_missing': 0.2,
    'mechanism': 'MCAR'
}

seed = 1
dataset = None

ARGS = {
    'train_size': train_size,
    'cal_size': cal_size,
    'params_test': params_test,
    'dim': dim,
    'params_reg': params_reg,
    'params_noise': params_noise,
    'dataset': dataset,
    'params_missing': params_missing,
    'seed': seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_name_data_imputed Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/files.py
code served (permissive licence) · get_code("bb5e0e6e956288b7")
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 str. 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

ARGS = {
    'train_size': 100,
    'cal_size': 50,
    'params_test': {'test_size': [30, 40]},
    'imputation': 'mean',
    'dim': 3,
    'params_reg': {
        'regression': 'Linear',
        'mean': 1.0,
        'scale': 1.0,
        'beta': np.array([1.0, 1.0, 1.0])
    },
    'params_noise': {
        'noise': 'Gaussian'
    },
    'dataset': None,
    'params_missing': {
        'prob_missing': 0.2,
        'mechanism': 'MCAR'
    },
    'seed': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_setting Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/files.py
code served (permissive licence) · get_code("555ea333e39ec124")
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 str. 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

# Construct valid arguments for get_setting
ARGS = {
    'dim': 5,
    'params_reg': {
        'regression': 'Linear',
        'mean': 2.0,
        'scale': 0.5,
        'beta': np.array([1.0, 1.5, 2.0, 1.2, 0.8])
    },
    'params_noise': {
        'noise': 'Gaussian'
    },
    'params_missing': {
        'prob_missing': 0.15,
        'mechanism': 'MNAR_mask_quantiles',
        'q': 0.5
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
pattern_to_id Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/utils.py
code served (permissive licence) · get_code("34fd4f13c9900cdd")
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 int, ndim 0, dtype family int, shape () 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 torch

torch.manual_seed(0)

# pattern_to_id takes a single parameter 'm' which is used as:
# - map(str, m) - so m must be iterable of elements convertible to str
# - ''.join(...) - joining strings
# - int(..., 2) - parsing as binary string
# A pattern is typically a sequence of 0s and 1s

m = [1, 0, 1, 1]

ARGS = {
    'm': m
}
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 int, ndim 0, dtype family int, 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
pattern_to_id_float Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/utils.py
code served (permissive licence) · get_code("d2918d2099ee5d8c")
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. 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - pattern_to_id_float takes parameter m
# - It maps each element of m to string using map(str, m)
# - Joins them into a single string
# - Converts from binary string to int using int(..., 2)
# - Converts to float
# So m should be an iterable of binary digits (0s and 1s)

# Create a valid binary pattern
m = [1, 0, 1, 1]  # A list of binary digits

ARGS = {
    "m": m
}
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 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
pattern_to_size Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/utils.py
code served (permissive licence) · get_code("288724cc980b3327")
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 int, ndim 0, dtype family int, shape () 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

def pattern_to_size(m):
    return int(np.sum(m))

# The function takes a single parameter 'm' and sums it using np.sum()
# 'm' should be a numpy array or array-like object that can be summed
# Creating a simple numpy array with distinct values

m = np.array([[1, 2, 3], [4, 5, 6]])

ARGS = {
    "m": m
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
predict_basemodel Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/prediction.py
code served (permissive licence) · get_code("0b1efa5140fdf8a5")
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 torch
import numpy as np

torch.manual_seed(0)

# Test data: 2 samples, 4 features
X_test = np.random.randn(2, 4)

# Case 1: Mean prediction with Linear basemodel
class LinearRegressor:
    def predict(self, X):
        return np.random.randn(X.shape[0])

fitted_basemodel_mean = LinearRegressor()

# Case 2: Quantiles prediction with Linear basemodel
class QuantileRegressor:
    def predict(self, X):
        return np.random.randn(X.shape[0])

fitted_basemodel_quantiles_linear = {
    'q_low': QuantileRegressor(),
    'q_high': QuantileRegressor()
}

# Case 3: Quantiles prediction with RF basemodel
class RFQuantileRegressor:
    def predict(self, X, quantiles=None):
        return np.random.randn(X.shape[0], 2)

fitted_basemodel_quantiles_rf = RFQuantileRegressor()

# Case 4: Quantiles prediction with XGBoost basemodel
fitted_basemodel_quantiles_xgboost = {
    'q_low': QuantileRegressor(),
    'q_high': QuantileRegressor()
}

# Case 5: Quantiles prediction with NNet basemodel
class NNetRegressor:
    def predict(self, X):
        return np.random.randn(X.shape[0], 2)

fitted_basemodel_quantiles_nnet = NNetRegressor()

# Use Mean with Linear as primary case
ARGS = {
    'fitted_basemodel': fitted_basemodel_mean,
    'X_test': X_test,
    'target': 'Mean',
    'basemodel': 'Linear',
    'alpha': 0.1
}
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 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
quantile_corrected Ran
ran on a synthesized input
mzaffran/conformalpredictionmissingvalues/prediction.py
code served (permissive licence) · get_code("385e650d6fd24e91")
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. 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

# Construct valid arguments for quantile_corrected
x = np.array([1.2, 3.4, 2.1, 4.5, 2.8, 3.9, 1.5, 4.2])
alpha = 0.1

ARGS = {
    "x": x,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
GetDataset Not yet run
unverified (harvested, no recorded run)
mzaffran/conformalpredictionmissingvalues/datasets.py
code served (permissive licence) · get_code("66b8b878d49f845d")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Conformal prediction is a theoretically grounded framework for constructing predictive intervals. We study conformal prediction with missing values in the covariates -- a setting that brings new challenges to uncertainty quantification. We first show that the marginal coverage guarantee of conformal prediction holds on imputed data for any missingness distribution and almost all imputation functions. However, we emphasize that the average coverage varies depending on the pattern of missing values: conformal methods tend to construct prediction intervals that under-cover the response conditionally to some missing patterns. This motivates our novel generalized conformalized quantile regression framework, missing data augmentation, which yields prediction intervals that are valid conditionally to the patterns of missing values, despite their exponential number. We then show that a universally consistent quantile regression algorithm trained on the imputed data is Bayes optimal for the pinball risk, thus achieving valid coverage conditionally to any given data point. Moreover, we examine the case of a linear model, which demonstrates the importance of our proposal in overcoming the heteroskedasticity induced by missing values. Using synthetic and data from critical care, we corroborate our theory and report improved performance of our methods.

For agents

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

get_harvested_code_for_paper("2306.02732")
get_code_for_paper("2306.02732")
have("2306.02732")

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

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

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

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

Connect an agent — have() is free.