SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.05567 · 2021

yaglm: a Python package for fitting and tuning generalized linear models that supports structured, adaptive and non-convex penalties

arXiv · PDF · Open in the Atlas

Code that ran

12 of 12 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 12 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/2110.05567.json · badge: /api/ran/2110.05567.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
yaglm/yaglm canonical (classifier label)
classifier basis not recorded on the link
12 ran · 0 no recorded run
FunctionStatusWhere it lives
basic_y_formatting Ran
ran on a synthesized input
yaglm/yaglm/yaglm/LossMixin.py
code served (permissive licence) · get_code("4b657c337fb9311b")
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
from sklearn.utils.validation import _check_y
from sklearn.utils.multiclass import check_classification_targets

# Create a simple X array (2 samples, 3 features)
X = np.array([[1.0, 2.0, 3.0],
              [4.0, 5.0, 6.0]], dtype=np.float64)

# Create a simple y array for regression (2 samples)
y = np.array([1.5, 2.5], dtype=np.float64)

ARGS = {
    'X': X,
    'y': y,
    'copy': True,
    'check_input': True,
    'is_clf': False,
    'multi_output': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
euclid_norm Ran
ran on a synthesized input
yaglm/yaglm/yaglm/linalg_utils.py
code served (permissive licence) · get_code("2f1f41031793f0d8")
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 numpy as np

# Create a simple numpy array for testing
x = np.array([3.0, 4.0])

ARGS = {
    "x": x
}
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 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_adaptive_weights Ran
ran on a synthesized input
yaglm/yaglm/yaglm/adaptive.py
code served (permissive licence) · get_code("35d3701146faa3d3")
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 numpy as np

# Define ARGS dict with valid arguments for get_adaptive_weights
ARGS = {
    'coef_init': np.array([0.5, 1.2, 0.8, 2.1]),
    'expon': 2,
    'pertub_init': 0.01,
    'n_samples': 100,
    'transform': lambda coef: np.abs(coef) * 2
}
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 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
l2_reg_loss Ran
ran on a synthesized input
yaglm/yaglm/yaglm/cvxpy/glm_loss.py
code served (permissive licence) · get_code("a131d93489504ffe")
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 multiply. 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 cvxpy as cp
import numpy as np

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

# Define small test data
batch_size = 2
n_features = 4

# X: feature matrix (batch_size x n_features)
X = np.random.randn(batch_size, n_features).astype(np.float64)

# y: target vector (batch_size,)
y = np.random.randn(batch_size).astype(np.float64)

# coef: coefficient vector (n_features,)
coef = np.random.randn(n_features).astype(np.float64)

# intercept: scalar intercept term
intercept = np.float64(0.5)

# offsets: offset vector matching y shape (batch_size,)
offsets = np.random.randn(batch_size).astype(np.float64)

ARGS = {
    "X": X,
    "y": y,
    "coef": coef,
    "intercept": intercept,
    "offsets": offsets,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type multiply — a multiply output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a multiply 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
leading_sval Ran
ran on a synthesized input
yaglm/yaglm/yaglm/linalg_utils.py
code served (permissive licence) · get_code("7e89b96204b766b9")
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
from scipy.sparse import csr_matrix

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

# Create a small test matrix
# Using distinct dimensions: 5 rows x 3 columns
X = np.random.randn(5, 3)

# Define ARGS dictionary with all parameters
ARGS = {
    'X': X,
    'solver': 'arpack',
}
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 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
lin_reg_loss Ran
ran on a synthesized input
yaglm/yaglm/yaglm/cvxpy/glm_loss.py
code served (permissive licence) · get_code("e26ec52c6c355686")
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 multiply. 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 cvxpy as cp

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

# Create small test data
n_samples = 2
n_features = 4

# X: design matrix (n_samples x n_features)
X = np.random.randn(n_samples, n_features).astype(np.float64)

# coef: coefficient vector (n_features,)
coef = np.random.randn(n_features).astype(np.float64)

# y: target vector (n_samples,)
y = np.random.randn(n_samples).astype(np.float64)

# intercept: scalar bias term
intercept = np.float64(0.5)

# offsets: offset vector (n_samples,)
offsets = np.random.randn(n_samples).astype(np.float64)

ARGS = {
    "X": X,
    "y": y,
    "coef": coef,
    "intercept": intercept,
    "offsets": offsets
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type multiply — a multiply output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a multiply 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
log_binom Ran
ran on a synthesized input
yaglm/yaglm/yaglm/extmath.py
code served (permissive licence) · get_code("a6c1f962fa3edaf1")
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.

from scipy.special import loggamma

# log_binom takes two integer parameters: n and k
# where n is the total number of items and k is the number of items to choose
# The function computes log(n choose k) = log(n!) - log(k!) - log((n-k)!)

n = 5
k = 2

ARGS = {
    "n": n,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
scipy — 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
log_reg_loss Ran
ran on a synthesized input
yaglm/yaglm/yaglm/cvxpy/glm_loss.py
code served (permissive licence) · get_code("a62f39f64624f0fd")
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 multiply. 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 cvxpy as cp

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

# Create small test data
# X: feature matrix (n_samples=2, n_features=4)
X = np.random.randn(2, 4).astype(np.float64)

# y: binary labels (n_samples=2,)
y = np.array([0, 1]).astype(np.float64)

# coef: coefficient vector (n_features=4,)
coef = cp.Variable(4)

# intercept: scalar bias term
intercept = 0.5

# offsets: per-sample offsets (n_samples=2,)
offsets = np.array([0.1, 0.2]).astype(np.float64)

ARGS = {
    'X': X,
    'y': y,
    'coef': coef,
    'intercept': intercept,
    'offsets': offsets
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type multiply — a multiply output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a multiply 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
process_y_lin_reg Ran
ran on a synthesized input
yaglm/yaglm/yaglm/LossMixin.py
code served (permissive licence) · get_code("912c81972b1008a9")
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

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

# Create small test data
n_samples = 2
n_features = 4

X = np.random.randn(n_samples, n_features).astype(np.float64)
y = np.random.randn(n_samples).astype(np.float64)
sample_weight = np.array([1.0, 2.0])

ARGS = {
    'X': X,
    'y': y,
    'fit_intercept': True,
    'standardize': True,
    'sample_weight': sample_weight,
    'copy': True,
    'check_input': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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_y_log_reg Ran
ran on a synthesized input
yaglm/yaglm/yaglm/LossMixin.py
code served (permissive licence) · get_code("49f435b0a913d442")
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
from sklearn.preprocessing import LabelEncoder
from sklearn.utils.class_weight import compute_class_weight

# Create minimal test data
np.random.seed(0)

# X: (n_samples, n_features) - needed for dtype and shape checks
X = np.random.randn(4, 3).astype(np.float64)

# y: binary classification labels - must have exactly 2 classes
y = np.array([0, 1, 0, 1], dtype=np.int64)

# sample_weight: optional array of weights per sample
sample_weight = np.array([1.0, 1.5, 1.0, 2.0])

# class_weight: can be 'balanced', dict, or None
class_weight = 'balanced'

ARGS = {
    'X': X,
    'y': y,
    'sample_weight': sample_weight,
    'class_weight': class_weight,
    'copy': True,
    'check_input': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
smallest_sval Ran
ran on a synthesized input
yaglm/yaglm/yaglm/linalg_utils.py
code served (permissive licence) · get_code("c0953d0fce3b5044")
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

# Create a simple matrix for testing
X = np.random.randn(4, 3)

# Create arguments dict
ARGS = {
    'X': X,
    'solver': 'arpack'
}
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 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
weighted_mean_std Ran
ran on a synthesized input
yaglm/yaglm/yaglm/extmath.py
code served (permissive licence) · get_code("d7fe9f56f21e66e7")
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
from scipy.sparse import csr_matrix

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

# Create a small dense data matrix (n_samples=5, n_features=3)
X_dense = np.array([
    [1.0, 2.0, 3.0],
    [4.0, 5.0, 6.0],
    [7.0, 8.0, 9.0],
    [10.0, 11.0, 12.0],
    [13.0, 14.0, 15.0]
], dtype=np.float64)

# Create a sparse version for testing
X_sparse = csr_matrix(X_dense)

# Create sample weights
sample_weight = np.array([0.1, 0.2, 0.3, 0.2, 0.2])

# Test case 1: Dense matrix without sample weights
ARGS = {
    "X": X_dense,
    "sample_weight": None,
    "ddof": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — 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

Also present in other papers' code

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

The yaglm package aims to make the broader ecosystem of modern generalized linear models accessible to data analysts and researchers. This ecosystem encompasses a range of loss functions (e.g. linear, logistic, quantile regression), constraints (e.g. positive, isotonic) and penalties. Beyond the basic lasso/ridge, the package supports structured penalties such as the nuclear norm as well as the group, exclusive, fused, and generalized lasso. It also supports more accurate adaptive and non-convex (e.g. SCAD) versions of these penalties that often come with strong statistical guarantees at limited additional computational expense. yaglm comes with a variety of tuning parameter selection methods including: cross-validation, information criteria that have favorable model selection properties, and degrees of freedom estimators. While several solvers are built in (e.g. FISTA), a key design choice allows users to employ their favorite state of the art optimization algorithms. Designed to be user friendly, the package automatically creates tuning parameter grids, supports tuning with fast path algorithms along with parallelization, and follows a unified scikit-learn compatible API.

For agents

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

get_harvested_code_for_paper("2110.05567")
get_code_for_paper("2110.05567")
have("2110.05567")

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

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

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

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

Connect an agent — have() is free.