| RiskScoreClassifier |
Ran ran on a synthesized input · constructed an object; no result was computed |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("37678fa53c8c1e6d") 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 an instance of its own class, RiskScoreClassifier: the run constructed the object and did not call it, so no result was computed. 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
# Create a small feature matrix X with shape (n, p) where n=2 samples, p=3 features
X = np.array([
[1.0, 2.0, 3.0],
[4.0, 5.0, 6.0]
], dtype=np.float64)
# Create labels y with shape (n,) where values are +1 or -1
y = np.array([1.0, -1.0], dtype=np.float64)
# Create coefficients (betas) with shape (p,) matching number of features
coefficients = np.array([0.5, -0.3, 0.2], dtype=np.float64)
# Create a scalar intercept (beta0)
intercept = 0.1
# Create a scalar multiplier
multiplier = 2.0
# Create feature names
feature_names = ["age", "score", "value"]
# Create training data (optional)
X_train = np.array([
[0.5, 1.5, 2.5],
[3.5, 4.5, 5.5],
[2.0, 3.0, 4.0]
], dtype=np.float64)
ARGS = {
"multiplier": multiplier,
"intercept": intercept,
"coefficients": coefficients,
"featureNames": feature_names,
"X_train": X_train
}
- 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 RiskScoreClassifier — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RiskScoreClassifier 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
|
| check_bounds |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("41dc10d969b9823e") 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 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
# Test case 1: scalar upper bound (valid)
bound_1 = 5.0
bound_name_1 = 'ub'
num_features_1 = 10
# Test case 2: scalar lower bound (valid)
bound_2 = -3.5
bound_name_2 = 'lb'
num_features_2 = 10
# Test case 3: list upper bound (valid)
bound_3 = [1.0, 2.0, 3.0, 4.0]
bound_name_3 = 'ub'
num_features_3 = 4
# Test case 4: list lower bound (valid)
bound_4 = [-1.0, -2.0, -3.0]
bound_name_4 = 'lb'
num_features_4 = 3
# Using the first test case
ARGS = {
'bound': 5.0,
'bound_name': 'ub',
'num_features': 10
}
- 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
|
| combine_images |
Ran ran on a synthesized input |
interpretml/fasterrisk/src/fasterrisk/score_visual.py code served (permissive licence) · get_code("44ff2c3c8bb7f519") 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 Image. 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.
from PIL import Image
# Create two simple test images with different dimensions
# bottom_image needs: width, height, and paste() method
bottom_image = Image.new('RGB', (100, 80), color=(200, 100, 50))
# top_image needs: width, height, and paste() method
top_image = Image.new('RGB', (60, 40), color=(100, 150, 200))
ARGS = {
'bottom_image': bottom_image,
'top_image': top_image,
'top_image_y_offset': 0,
'bottom_image_y_offset': -90,
'crop_margin': 40
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 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
|
| compute_logisticLoss_from_ExpyXB |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("b3848c921faca63f") 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 numpy as np
# The function compute_logisticLoss_from_ExpyXB takes ExpyXB as input
# and computes log(1 + 1/ExpyXB) for each element, then sums them all
# ExpyXB should be a numpy array of positive values (it's exp(y*X*B))
# Create a small numpy array with positive values
ExpyXB = np.array([1.5, 2.3, 0.8, 3.1, 1.2, 2.9])
ARGS = {
"ExpyXB": ExpyXB
}
- 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
|
| compute_logisticLoss_from_X_y_beta0_betas |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("e3801c0aa814a786") 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 numpy as np
# Analyze the function to understand what it needs:
# - X: used with .dot(betas), so should be a 2D array
# - y: multiplied element-wise with XB, so should be 1D array
# - beta0: scalar, added to XB
# - betas: multiplied with X via dot product, should be 1D array
# Create small test data
np.random.seed(0)
# X: shape (2, 3) - 2 samples, 3 features
X = np.random.randn(2, 3).astype(np.float64)
# y: shape (2,) - binary labels (typically -1 or 1 for logistic loss)
y = np.array([1.0, -1.0])
# beta0: scalar intercept term
beta0 = 0.5
# betas: shape (3,) - one coefficient per feature in X
betas = np.random.randn(3).astype(np.float64)
ARGS = {
"X": X,
"y": y,
"beta0": beta0,
"betas": betas
}
- 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
|
| compute_logisticLoss_from_betas_and_yX |
Ran ran, violated the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("2ecfd70b7a0901a9") 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 numpy as np
# Create small test data
np.random.seed(0)
# betas: coefficient vector (shape: n_features,)
betas = np.array([0.5, -0.3, 0.2, 0.1])
# yX: matrix of y*X values (shape: n_samples, n_features)
# where each row is y_i * X_i (element-wise product)
n_samples = 2
n_features = 4
yX = np.random.randn(n_samples, n_features)
ARGS = {
"betas": betas,
"yX": yX,
}
- 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
|
| compute_logisticLoss_from_yXB |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("9a23d1e8ebb41bae") 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 float32, 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
# The function compute_logisticLoss_from_yXB takes a single parameter yXB
# which is used in a numpy computation: np.log(1.0 + np.exp(-yXB))
# This means yXB should be a numpy array of numeric values
# Create a small numpy array with shape (2, 4) - batch size 2, dimension 4
yXB = np.array([
[0.5, -0.3, 1.2, -0.8],
[0.1, 0.9, -0.5, 0.3]
], dtype=np.float32)
ARGS = {
"yXB": yXB
}
- 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 float32, 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
|
| convert_continuous_df_to_binary_df |
Ran ran on a synthesized input |
interpretml/fasterrisk/src/fasterrisk/binarization_util.py code served (permissive licence) · get_code("73017956820af0ea") 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 a small sample dataframe with continuous features
np.random.seed(0)
df = pd.DataFrame({
'feature_1': np.random.randn(20),
'feature_2': np.random.randn(20) * 10,
'feature_3': np.concatenate([np.random.randn(15), [np.nan, np.nan, np.nan, np.nan, np.nan]])
})
ARGS = {
'df': df,
'max_num_thresholds_per_feature': 100,
'sampling_weights': 'uniform',
'sampling_seed': 0,
'get_featureIndex_to_groupIndex': False
}
- 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 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
|
| find_crop_x_boundaries |
Ran ran on a synthesized input |
interpretml/fasterrisk/src/fasterrisk/score_visual.py code served (permissive licence) · get_code("f0f7c4a3fbcbb266") 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, ndim 1, dtype family int; 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 PIL import Image
import numpy as np
# Create a simple test image with PIL
# The function expects an image with .size attribute and .load() method
# which are PIL Image methods
# Create a white image with some non-white pixels to test the crop detection
width, height = 100, 50
img_array = np.ones((height, width, 3), dtype=np.uint8) * 255 # All white
# Add some non-white pixels in the middle section
img_array[10:40, 30:70, :] = [0, 0, 0] # Black rectangle in the middle
# Convert numpy array to PIL Image
img = Image.fromarray(img_array, mode='RGB')
ARGS = {
'img': img
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, 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 int — 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_all_product_booleans |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("ab4c557e2d3eb8e8") 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 int, shape (32, 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 itertools import product
def get_all_product_booleans(sparsity=5):
all_lists = []
for i in range(sparsity):
all_lists.append([0, 1])
all_products = list(product(*all_lists))
all_products = [list(elem) for elem in all_products]
return np.array(all_products)
ARGS = {
"sparsity": 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 ndarray, ndim 2, dtype family int, shape (32, 5) — shape (32, 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_groupIndex_to_featureIndices |
Ran ran; our contract draft was wrong, not the code |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("a23fa7917d6fe274") 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 torch
ARGS = {
"featureIndex_to_groupIndex": [0, 1, 0, 2, 1, 0]
}
- 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 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
|
| get_nonsupport_indices |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("e2d46e4bc34586a7") 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 (3,) 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 small array of beta coefficients with some values near zero
# and some values clearly above the threshold of 1e-09
betas = np.array([
1e-10, # Below threshold
5e-09, # Below threshold
0.0, # Below threshold
2e-08, # Above threshold
0.5, # Above threshold
-1e-11, # Below threshold
-0.3, # Above threshold
3e-09 # Below threshold
])
ARGS = {
"betas": betas
}
- 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 int, shape (3,) — shape (3,) 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_support_indices |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("26c3099cf2c993d1") 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 (3,) 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 small array of coefficients/betas with some non-zero and some near-zero values
betas = np.array([0.5, 1e-10, -0.3, 0.0, 2.1, 1e-11], dtype=np.float64)
ARGS = {
"betas": betas
}
- 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 int, shape (3,) — shape (3,) 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
|
| groupSparseDiversePoolLogRegModel |
Ran ran on a synthesized input |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("bdb229f92e57435e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
def normalize_X(X):
X_mean = np.mean(X, axis=0)
X_centered = X - X_mean
X_norm = np.linalg.norm(X_centered, axis=0)
X_norm[X_norm == 0] = 1.0
X_normalized = X_centered / X_norm
scaled_feature_indices = np.where(X_norm != 1.0)[0]
return X_normalized, X_mean, X_norm, scaled_feature_indices
def compute_logisticLoss_from_ExpyXB(ExpyXB):
return np.sum(np.log(1.0 + np.reciprocal(ExpyXB)))
def get_nonsupport_indices(betas):
return np.where(np.abs(betas) <= 1e-09)[0]
def get_support_indices(betas):
return np.where(np.abs(betas) > 1e-09)[0]
class logRegModel:
def __init__(self, X, y, lambda2=1e-08, intercept=True, original_lb=-5, original_ub=5):
self.X = X
self.X_normalized, self.X_mean, self.X_norm, self.scaled_feature_indices = normalize_X(self.X)
self.n, self.p = self.X_normalized.shape
self.y = y.reshape(-1).astype(float)
self.yX = y.reshape(-1, 1) * self.X_normalized
self.yXT = np.zeros((self.p, self.n))
self.yXT[:] = np.transpose(self.yX)[:]
self.beta0 = 0
self.betas = np.zeros((self.p,))
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
self.intercept = intercept
self.lambda2 = lambda2
self.twoLambda2 = 2 * self.lambda2
self.Lipschitz = 0.25 + self.twoLambda2
self.lbs = original_lb * np.ones(self.p)
self.lbs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.ubs = original_ub * np.ones(self.p)
self.ubs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.total_child_added = 0
def warm_start_from_beta0_betas(self, beta0, betas):
self.beta0, self.betas = (beta0, betas)
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
def get_beta0_betas(self):
return (self.beta0, self.betas)
X = np.random.randn(5, 4)
y = np.array([1.0, -1.0, 1.0, -1.0, 1.0])
INIT_ARGS = {
'X': X,
'y': y,
'lambda2': 1e-08,
'intercept': True,
'original_lb': -5,
'original_ub': 5
}
ARGS = {
'beta0': 0.1,
'betas': np.array([0.05, -0.03, 0.02, 0.01])
}
METHOD = 'warm_start_from_beta0_betas'
if __name__ == '__main__':
model = logRegModel(**INIT_ARGS)
model.warm_start_from_beta0_betas(**ARGS)
result = model.get_beta0_betas()
print("Result:", result)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| groupSparseLogRegModel |
Ran ran on a synthesized input |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("194ba7cd0fb080ac") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
def normalize_X(X):
X_mean = np.mean(X, axis=0)
X_centered = X - X_mean
X_norm = np.linalg.norm(X_centered, axis=0)
X_norm[X_norm == 0] = 1.0
X_normalized = X_centered / X_norm
scaled_feature_indices = np.where(X_norm != 1.0)[0]
return X_normalized, X_mean, X_norm, scaled_feature_indices
def compute_logisticLoss_from_ExpyXB(ExpyXB):
return np.sum(np.log(1.0 + np.reciprocal(ExpyXB)))
def get_nonsupport_indices(betas):
return np.where(np.abs(betas) <= 1e-09)[0]
def get_support_indices(betas):
return np.where(np.abs(betas) > 1e-09)[0]
class logRegModel:
def __init__(self, X, y, lambda2=1e-08, intercept=True, original_lb=-5, original_ub=5):
self.X = X
self.X_normalized, self.X_mean, self.X_norm, self.scaled_feature_indices = normalize_X(self.X)
self.n, self.p = self.X_normalized.shape
self.y = y.reshape(-1).astype(float)
self.yX = y.reshape(-1, 1) * self.X_normalized
self.yXT = np.zeros((self.p, self.n))
self.yXT[:] = np.transpose(self.yX)[:]
self.beta0 = 0
self.betas = np.zeros((self.p,))
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
self.intercept = intercept
self.lambda2 = lambda2
self.twoLambda2 = 2 * self.lambda2
self.Lipschitz = 0.25 + self.twoLambda2
self.lbs = original_lb * np.ones(self.p)
self.lbs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.ubs = original_ub * np.ones(self.p)
self.ubs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.total_child_added = 0
def warm_start_from_beta0_betas(self, beta0, betas):
self.beta0, self.betas = (beta0, betas)
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
def get_beta0_betas(self):
return (self.beta0, self.betas)
def get_grad_at_coord(self, ExpyXB, betas_j, yX_j, j):
return -np.inner(np.reciprocal(1 + ExpyXB), yX_j) + self.twoLambda2 * betas_j
def update_ExpyXB(self, ExpyXB, yX_j, diff_betas_j):
ExpyXB *= np.exp(yX_j * diff_betas_j)
def optimize_1step_at_coord(self, ExpyXB, betas, yX_j, j):
prev_betas_j = betas[j]
current_betas_j = prev_betas_j
grad_at_j = self.get_grad_at_coord(ExpyXB, current_betas_j, yX_j, j)
step_at_j = grad_at_j / self.Lipschitz
current_betas_j = prev_betas_j - step_at_j
current_betas_j = max(self.lbs[j], min(self.ubs[j], current_betas_j))
diff_betas_j = current_betas_j - prev_betas_j
betas[j] = current_betas_j
self.update_ExpyXB(ExpyXB, yX_j, diff_betas_j)
X = np.random.randn(5, 4)
y = np.array([1.0, -1.0, 1.0, -1.0, 1.0])
INIT_ARGS = {
'X': X,
'y': y,
'lambda2': 1e-08,
'intercept': True,
'original_lb': -5,
'original_ub': 5
}
ARGS = {
'beta0': 0.1,
'betas': np.array([0.05, -0.03, 0.02, 0.01])
}
METHOD = 'warm_start_from_beta0_betas'
model = logRegModel(**INIT_ARGS)
model.warm_start_from_beta0_betas(**ARGS)
result = model.get_beta0_betas()
print("Result:", result)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| insertIntercept_asFirstColOf_X |
Ran ran, honoured the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("4647d2190dcde8df") 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 (2, 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
# The function takes a single parameter X which should be a 2D numpy array
# It calculates len(X) to get the number of rows
# It creates an intercept column of ones with shape (n, 1)
# It horizontally stacks the intercept with X
# Create a small sample 2D numpy array with distinct dimensions
X = np.random.randn(2, 4) # 2 rows, 4 columns
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 ndarray, ndim 2, dtype family float, shape (2, 5) — shape (2, 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
|
| isEqual_upTo_8decimal |
Ran ran, violated the contract we drafted |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("a6668caa680dc78d") 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 bool, 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
# Test case 1: scalar comparison
a_scalar = 1.5
b_scalar = 1.50000001
# Test case 2: array comparison
a_array = np.array([1.0, 2.0, 3.0, 4.0])
b_array = np.array([1.00000001, 2.00000001, 3.00000001, 4.00000001])
# The function takes two parameters: a and b
# We'll test with the scalar case first
ARGS = {
"a": a_scalar,
"b": b_scalar
}
- 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 bool, 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
|
| logRegModel |
Ran ran on a synthesized input · constructed an object; no result was computed |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("3ad4a57dda345e02") 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 an instance of its own class, logRegModel: the run constructed the object and did not call it, so no result was computed. 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 synthetic data for logistic regression
n_samples = 2 # Number of samples
n_features = 4 # Number of features
# X: feature matrix (n_samples x n_features)
X = np.random.randn(n_samples, n_features)
# y: binary labels (-1 or 1)
y = np.array([1.0, -1.0])
# lambda2: L2 regularization parameter
lambda2 = 1e-08
# intercept: whether to use intercept term
intercept = True
# original_lb and original_ub: bounds for original coefficients
original_lb = -5
original_ub = 5
ARGS = {
'X': X,
'y': y,
'lambda2': lambda2,
'intercept': intercept,
'original_lb': original_lb,
'original_ub': original_ub
}
- 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 logRegModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a logRegModel 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
|
| nan_onehot_single_column |
Ran ran on a synthesized input |
interpretml/fasterrisk/src/fasterrisk/binarization_util.py code served (permissive licence) · get_code("023fa22a93923409") 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 pandas as pd
# Create a simple pandas Series with some NaN values
column = pd.Series([1.0, np.nan, 3.0, np.nan, 5.0])
ARGS = {
"column": column
}
- 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 (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
|
| normalize_X |
Ran ran; our contract draft was wrong, not the code |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("b0528765fde22945") 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
# Create a small sample dataset
# Shape: (n_samples, n_features) = (2, 4)
np.random.seed(0)
X = np.random.randn(2, 4).astype(np.float64)
# Construct the ARGS dictionary
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 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
|
| output_to_score_risk_df |
Ran ran on a synthesized input |
interpretml/fasterrisk/src/fasterrisk/score_visual.py code served (permissive licence) · get_code("13ca226e66a18392") 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 pandas as pd
# Construct valid input_text with SCORE and RISK lines
# The function expects lines starting with 'SCORE' or 'RISK' followed by pipe-separated tokens
input_text = """SCORE | 85.5 | 92.3 | 78.1
RISK | 15.2% | 8.5% | 22.1%
OTHER LINE
SCORE | 88.0 | 91.5
RISK | 12.3% | 9.8%"""
ARGS = {
'input_text': input_text
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- pandas — 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
|
| sparseDiversePoolLogRegModel |
Ran ran on a synthesized input |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("74f5844a4057224b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
def normalize_X(X):
X_mean = np.mean(X, axis=0)
X_centered = X - X_mean
X_norm = np.linalg.norm(X_centered, axis=0)
X_norm[X_norm == 0] = 1.0
X_normalized = X_centered / X_norm
scaled_feature_indices = np.where(X_norm != 1.0)[0]
return X_normalized, X_mean, X_norm, scaled_feature_indices
def compute_logisticLoss_from_ExpyXB(ExpyXB):
return np.sum(np.log(1.0 + np.reciprocal(ExpyXB)))
def get_nonsupport_indices(betas):
return np.where(np.abs(betas) <= 1e-09)[0]
def get_support_indices(betas):
return np.where(np.abs(betas) > 1e-09)[0]
class logRegModel:
def __init__(self, X, y, lambda2=1e-08, intercept=True, original_lb=-5, original_ub=5):
self.X = X
self.X_normalized, self.X_mean, self.X_norm, self.scaled_feature_indices = normalize_X(self.X)
self.n, self.p = self.X_normalized.shape
self.y = y.reshape(-1).astype(float)
self.yX = y.reshape(-1, 1) * self.X_normalized
self.yXT = np.zeros((self.p, self.n))
self.yXT[:] = np.transpose(self.yX)[:]
self.beta0 = 0
self.betas = np.zeros((self.p,))
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
self.intercept = intercept
self.lambda2 = lambda2
self.twoLambda2 = 2 * self.lambda2
self.Lipschitz = 0.25 + self.twoLambda2
self.lbs = original_lb * np.ones(self.p)
self.lbs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.ubs = original_ub * np.ones(self.p)
self.ubs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.total_child_added = 0
def warm_start_from_beta0_betas_ExpyXB(self, beta0, betas, ExpyXB):
self.beta0, self.betas, self.ExpyXB = (beta0, betas, ExpyXB)
def get_beta0_betas_ExpyXB(self):
return (self.beta0, self.betas, self.ExpyXB)
X = np.random.randn(5, 4)
y = np.array([1.0, -1.0, 1.0, -1.0, 1.0])
INIT_ARGS = {
'X': X,
'y': y,
'lambda2': 1e-08,
'intercept': True,
'original_lb': -5,
'original_ub': 5
}
beta0_test = 0.5
betas_test = np.array([0.1, 0.2, 0.15, 0.05])
ExpyXB_test = np.exp(y * beta0_test + (y.reshape(-1, 1) * X).dot(betas_test))
ARGS = {
'beta0': beta0_test,
'betas': betas_test,
'ExpyXB': ExpyXB_test
}
METHOD = 'warm_start_from_beta0_betas_ExpyXB'
if __name__ == '__main__':
model = logRegModel(**INIT_ARGS)
getattr(model, METHOD)(**ARGS)
result = model.get_beta0_betas_ExpyXB()
print("Result:", result)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| sparseLogRegModel |
Ran ran on a synthesized input |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("02a9768373cc7609") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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
def normalize_X(X):
X_mean = np.mean(X, axis=0)
X_centered = X - X_mean
X_norm = np.linalg.norm(X_centered, axis=0)
X_norm[X_norm == 0] = 1.0
X_normalized = X_centered / X_norm
scaled_feature_indices = np.where(X_norm != 1.0)[0]
return X_normalized, X_mean, X_norm, scaled_feature_indices
def compute_logisticLoss_from_ExpyXB(ExpyXB):
return np.sum(np.log(1.0 + np.reciprocal(ExpyXB)))
def get_nonsupport_indices(betas):
return np.where(np.abs(betas) <= 1e-09)[0]
def get_support_indices(betas):
return np.where(np.abs(betas) > 1e-09)[0]
class logRegModel:
def __init__(self, X, y, lambda2=1e-08, intercept=True, original_lb=-5, original_ub=5):
self.X = X
self.X_normalized, self.X_mean, self.X_norm, self.scaled_feature_indices = normalize_X(self.X)
self.n, self.p = self.X_normalized.shape
self.y = y.reshape(-1).astype(float)
self.yX = y.reshape(-1, 1) * self.X_normalized
self.yXT = np.zeros((self.p, self.n))
self.yXT[:] = np.transpose(self.yX)[:]
self.beta0 = 0
self.betas = np.zeros((self.p,))
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
self.intercept = intercept
self.lambda2 = lambda2
self.twoLambda2 = 2 * self.lambda2
self.Lipschitz = 0.25 + self.twoLambda2
self.lbs = original_lb * np.ones(self.p)
self.lbs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.ubs = original_ub * np.ones(self.p)
self.ubs[self.scaled_feature_indices] *= self.X_norm[self.scaled_feature_indices]
self.total_child_added = 0
def warm_start_from_beta0_betas(self, beta0, betas):
self.beta0, self.betas = (beta0, betas)
self.ExpyXB = np.exp(self.y * self.beta0 + self.yX.dot(self.betas))
def get_beta0_betas(self):
return (self.beta0, self.betas)
def get_grad_at_coord(self, ExpyXB, betas_j, yX_j, j):
return -np.inner(np.reciprocal(1 + ExpyXB), yX_j) + self.twoLambda2 * betas_j
def update_ExpyXB(self, ExpyXB, yX_j, diff_betas_j):
ExpyXB *= np.exp(yX_j * diff_betas_j)
def optimize_1step_at_coord(self, ExpyXB, betas, yX_j, j):
prev_betas_j = betas[j]
current_betas_j = prev_betas_j
grad_at_j = self.get_grad_at_coord(ExpyXB, current_betas_j, yX_j, j)
step_at_j = grad_at_j / self.Lipschitz
current_betas_j = prev_betas_j - step_at_j
current_betas_j = max(self.lbs[j], min(self.ubs[j], current_betas_j))
diff_betas_j = current_betas_j - prev_betas_j
betas[j] = current_betas_j
self.update_ExpyXB(ExpyXB, yX_j, diff_betas_j)
X = np.random.randn(2, 4)
y = np.array([1.0, -1.0])
INIT_ARGS = {
'X': X,
'y': y,
'lambda2': 1e-08,
'intercept': True,
'original_lb': -5,
'original_ub': 5
}
ARGS = {
'beta0': 0.1,
'betas': np.array([0.05, -0.03, 0.02, 0.01])
}
METHOD = 'warm_start_from_beta0_betas'
model = logRegModel(**INIT_ARGS)
model.warm_start_from_beta0_betas(**ARGS)
result = model.get_beta0_betas()
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| starRaySearchModel |
Ran ran on a synthesized input · constructed an object; no result was computed |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("d53690360d8309ed") 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 an instance of its own class, starRaySearchModel: the run constructed the object and did not call it, so no result was computed. 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
# Create small sample data
np.random.seed(0)
n_samples = 5 # number of observations
n_features = 3 # number of features (before intercept)
# Create X matrix (n_samples x n_features)
X = np.random.randn(n_samples, n_features)
# Create y vector (n_samples,) with binary labels
y = np.random.choice([-1, 1], size=n_samples)
# Define arguments for starRaySearchModel
ARGS = {
"X": X,
"y": y,
"lb": -5,
"ub": 5,
"num_ray_search": 20,
"early_stop_tolerance": 0.001
}
- 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 starRaySearchModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a starRaySearchModel 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
|
| RiskScoreOptimizer |
Not yet run unverified (harvested, no recorded run) |
jiachangliu/fasterrisk/src/fasterrisk/fasterrisk.py code served (permissive licence) · get_code("6b3ac656b3e18ba0") How it ran |