SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1509.05778 · 2015

A Bayesian approach to linear regression in astronomy

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 3 have no contract verdict; 0 failures of our instrument; 0 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/1509.05778.json · badge: /api/ran/1509.05778.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
rsnemmen/BCES community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
bces Ran
ran on a synthesized input
rsnemmen/BCES/bces/bces.py
code served (permissive licence) · get_code("b4c3d3a2f8351fb6")
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 2, 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 numpy as np

# Generate small test data
np.random.seed(0)
n_samples = 10

# Create arrays for y1, y1err, y2, y2err, cerr
y1 = np.random.randn(n_samples)
y1err = np.abs(np.random.randn(n_samples)) + 0.1
y2 = np.random.randn(n_samples)
y2err = np.abs(np.random.randn(n_samples)) + 0.1
cerr = np.random.randn(n_samples) * 0.05

ARGS = {
    "y1": y1,
    "y1err": y1err,
    "y2": y2,
    "y2err": y2err,
    "cerr": cerr,
}
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 2, 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
bcesboot Ran
ran on a synthesized input
rsnemmen/BCES/bces/bces.py
code served (permissive licence) · get_code("4a1e2385e595babd")
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 2, 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 numpy as np
import scipy.stats

# Create small synthetic datasets for testing bcesboot
np.random.seed(0)

# Generate data with small size
n_samples = 8

# y1: first independent variable
y1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0])

# y1err: measurement errors for y1
y1err = np.array([0.1, 0.1, 0.15, 0.12, 0.11, 0.13, 0.14, 0.12])

# y2: dependent variable (with linear relationship to y1 plus noise)
y2 = 2.5 * y1 + 1.0 + np.random.normal(0, 0.3, n_samples)
y2 = np.array([6.5, 11.2, 16.1, 20.8, 25.9, 31.2, 36.5, 41.8])

# y2err: measurement errors for y2
y2err = np.array([0.2, 0.25, 0.22, 0.28, 0.24, 0.26, 0.23, 0.27])

# cerr: covariance between measurement errors
cerr = np.array([0.01, 0.01, 0.015, 0.012, 0.011, 0.013, 0.014, 0.012])

# nsim: number of bootstrap simulations
nsim = 100

ARGS = {
    'y1': y1,
    'y1err': y1err,
    'y2': y2,
    'y2err': y2err,
    'cerr': cerr,
    'nsim': nsim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
bootstrap Ran
ran on a synthesized input
rsnemmen/BCES/bces/bces.py
code served (permissive licence) · get_code("ade06d7c5c714e50")
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 scipy.stats

# Test case 1: Single array (numpy array)
single_array = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

# Test case 2: List of arrays with matching sizes
array1 = np.array([10.0, 20.0, 30.0, 40.0])
array2 = np.array([100.0, 200.0, 300.0, 400.0])
list_of_arrays = [array1, array2]

# ARGS can test either case - using single array
ARGS = {
    'v': single_array
}
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

Also present in other papers' code

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

Linear regression is common in astronomical analyses. I discuss a Bayesian hierarchical modeling of data with heteroscedastic and possibly correlated measurement errors and intrinsic scatter. The method fully accounts for time evolution. The slope, the normalization, and the intrinsic scatter of the relation can evolve with the redshift. The intrinsic distribution of the independent variable is approximated using a mixture of Gaussian distributions whose means and standard deviations depend on time. The method can address scatter in the measured independent variable (a kind of Eddington bias), selection effects in the response variable (Malmquist bias), and departure from linearity in form of a knee. I tested the method with toy models and simulations and quantified the effect of biases and inefficient modeling. The R-package LIRA (LInear Regression in Astronomy) is made available to perform the regression.

For agents

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

get_harvested_code_for_paper("1509.05778")
get_code_for_paper("1509.05778")
have("1509.05778")

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

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

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

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

Connect an agent — have() is free.