| add_sqrt |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/utils.py code served (permissive licence) · get_code("d5951d6b51e09896") 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 ArrayImpl, ndim 2, dtype family float, shape (4, 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 jax.numpy as jnp
import numpy as np
# Create small square matrices for sqrt_A and sqrt_B
# Using dimension 4 as specified
n_dim = 4
# Create a simple positive semi-definite matrix and take its square root
# For sqrt_A: start with a random matrix and ensure it's positive semi-definite
np.random.seed(0)
A_temp = np.random.randn(n_dim, n_dim)
A = A_temp @ A_temp.T # Ensure positive semi-definite
sqrt_A_np = np.linalg.cholesky(A)
# For sqrt_B: similar process
B_temp = np.random.randn(n_dim, n_dim)
B = B_temp @ B_temp.T # Ensure positive semi-definite
sqrt_B_np = np.linalg.cholesky(B)
# Convert to jax arrays
sqrt_A = jnp.array(sqrt_A_np, dtype=jnp.float32)
sqrt_B = jnp.array(sqrt_B_np, dtype=jnp.float32)
ARGS = {
"sqrt_A": sqrt_A,
"sqrt_B": sqrt_B,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
|
| ibm_init |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/prior/ibm.py code served (permissive licence) · get_code("9bf758a66c464281") 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 4, 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 jax
import jax.numpy as jnp
import jax.scipy as jsp
import numpy as np
ARGS = {
"dt": 0.1,
"n_deriv": 3,
"sigma": jnp.array([0.5, 1.0, 1.5, 2.0]),
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 4, 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
|
| ibm_state |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/prior/ibm.py code served (permissive licence) · get_code("6384560039110b11") 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 3, 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 jax.numpy as jnp
import jax.scipy as jsp
ARGS = {
"dt": 0.1,
"q": 2,
"sigma": 1.5,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 3, 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
|
| indep_init |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/prior/indep_init.py code served (permissive licence) · get_code("0f20bcd284871be1") 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 4, 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 jax.numpy as jnp
import jax.scipy.linalg as jsl
# Create small block matrices for prior parameters
# prior_weight should be a tuple/list of matrices to be block diagonalized
block1_weight = jnp.array([[1.0, 0.5], [0.2, 0.9]])
block2_weight = jnp.array([[0.8, 0.1], [0.3, 0.7]])
prior_weight = (block1_weight, block2_weight)
# prior_var should be a tuple/list of variance matrices to be block diagonalized
block1_var = jnp.array([[0.5, 0.1], [0.1, 0.4]])
block2_var = jnp.array([[0.6, 0.05], [0.05, 0.5]])
prior_var = (block1_var, block2_var)
# Combine into prior_pars tuple
prior_pars = (prior_weight, prior_var)
ARGS = {
"prior_pars": prior_pars
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 4, 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
|
| interrogate_chkrebtii |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/interrogate.py code served (permissive licence) · get_code("e7b5bf0434acb9a2") 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 jax
import jax.numpy as jnp
import jax.random as jr
# Set seed for reproducibility
key = jr.PRNGKey(0)
# Define small dimensions
n_block = 2 # number of blocks
n_bstate = 3 # dimension of state per block
n_weight = 2 # dimension of weight output
# Create ODE function that takes (state, t, **params) and returns predictions
def ode_fun(x_state, t, scale=1.0):
"""Simple ODE function: returns negative of scaled state"""
return -scale * x_state
# Create ode_weight: shape (n_block, n_weight, n_bstate)
# This will be used in matrix multiplication: wm @ vsp @ wm.T
ode_weight = jnp.ones((n_block, n_weight, n_bstate))
# Create mean_state_pred: shape (n_block, n_bstate)
mean_state_pred = jnp.ones((n_block, n_bstate))
# Create var_state_pred: shape (n_block, n_bstate, n_bstate)
# Must be positive semi-definite for multivariate_normal
var_state_pred = jnp.array([
jnp.eye(n_bstate) * 0.5,
jnp.eye(n_bstate) * 0.5
])
# Time parameter
t = 0.0
# Kalman filter type
kalman_type = 'standard'
# Additional parameters for ode_fun
params = {'scale': 1.0}
# Construct ARGS dictionary with all function parameters
ARGS = {
'key': key,
'ode_fun': ode_fun,
'ode_weight': ode_weight,
't': t,
'mean_state_pred': mean_state_pred,
'var_state_pred': var_state_pred,
'kalman_type': kalman_type,
**params
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — 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
|
| interrogate_kramer |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/interrogate.py code served (permissive licence) · get_code("ed22721f7952b81d") 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 jax
import jax.numpy as jnp
# Set up random seed for reproducibility
key = jax.random.PRNGKey(0)
# Define parameters based on the function signature
n_block = 2 # number of blocks
n_bmeas = 3 # measurement dimension per block
n_bstate = 4 # state dimension per block
# Create ode_weight tensor with shape (n_block, n_bmeas, n_bstate)
ode_weight = jnp.ones((n_block, n_bmeas, n_bstate))
# Create time parameter
t = 0.5
# Create mean_state_pred with shape (n_block, n_bstate)
mean_state_pred = jnp.array([[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0]])
# Create var_state_pred with shape (n_block, n_bstate, n_bstate)
var_state_pred = jnp.ones((n_block, n_bstate, n_bstate))
# Define a simple ODE function that takes (state, t, **params)
def ode_fun(state, t, **params):
"""
Simple ODE function.
state has shape (n_block, n_bstate)
returns array of same shape
"""
return 0.1 * state
# Additional params dict (can be empty or contain ODE parameters)
params = {}
ARGS = {
"key": key,
"ode_fun": ode_fun,
"ode_weight": ode_weight,
"t": t,
"mean_state_pred": mean_state_pred,
"var_state_pred": var_state_pred,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — 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
|
| interrogate_schober |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/interrogate.py code served (permissive licence) · get_code("cde6cd9bff696a55") 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 jax
import jax.numpy as jnp
# Set up random key for JAX
key = jax.random.PRNGKey(0)
# Define a simple ODE function that takes (state, t, **params) and returns derivatives
def ode_fun(state, t, **params):
"""Simple ODE function: returns negative of state scaled by a parameter."""
scale = params.get('scale', 1.0)
return -scale * state
# Create ode_weight tensor with shape (n_block, n_bmeas, n_bmeas)
# Using distinct dimensions: 2, 3, 3
n_block = 2
n_bmeas = 3
ode_weight = jnp.ones((n_block, n_bmeas, n_bmeas))
# Time parameter
t = 0.5
# Mean state prediction: shape (n_block, state_dim)
# Using state_dim = 4 to be distinct from n_bmeas = 3
mean_state_pred = jnp.ones((n_block, 4))
# Variance state prediction: shape (n_block, state_dim, state_dim)
var_state_pred = jnp.eye(4).reshape(1, 4, 4) * 0.1
var_state_pred = jnp.tile(var_state_pred, (n_block, 1, 1))
# Additional parameters for the ODE function
params = {'scale': 1.5}
ARGS = {
'key': key,
'ode_fun': ode_fun,
'ode_weight': ode_weight,
't': t,
'mean_state_pred': mean_state_pred,
'var_state_pred': var_state_pred,
}
# Merge params into ARGS
ARGS.update(params)
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax — 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
|
| multivariate_normal_logpdf |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/utils.py code served (permissive licence) · get_code("1cdc64790cf0fa88") 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 ArrayImpl, 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 jax.numpy as jnp
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Dimension of the multivariate normal
p = 4
# Create observation vector x
x = jnp.array(np.random.randn(p), dtype=jnp.float32)
# Create mean vector
mean = jnp.array(np.random.randn(p), dtype=jnp.float32)
# Create a symmetric positive definite covariance matrix
# Generate random matrix and multiply by its transpose to ensure positive definiteness
A = np.random.randn(p, p)
cov_np = A @ A.T + np.eye(p) # Add identity to ensure positive definiteness
cov = jnp.array(cov_np, dtype=jnp.float32)
ARGS = {
"x": x,
"mean": mean,
"cov": cov,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ArrayImpl, 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
|
| mvncond |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/utils.py code served (permissive licence) · get_code("377de7eb841e8bad") 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 jax.numpy as jnp
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Create a small multivariate normal setup
# mu: mean vector of dimension 2*n_dim
# Sigma: covariance matrix of dimension (2*n_dim, 2*n_dim)
# icond: boolean array indicating which dimensions to condition on
n_dim = 2
total_dim = 2 * n_dim # 4 dimensions total
# Create a mean vector
mu = jnp.array([1.0, 2.0, 3.0, 4.0])
# Create a positive definite covariance matrix
# Start with a random matrix and make it positive definite
base_matrix = np.random.randn(total_dim, total_dim)
Sigma = np.dot(base_matrix, base_matrix.T) + np.eye(total_dim)
Sigma = jnp.array(Sigma, dtype=jnp.float32)
# Create a boolean conditioning array
# True means we condition on that dimension, False means we want to predict it
icond = jnp.array([True, False, True, False])
ARGS = {
"mu": mu,
"Sigma": Sigma,
"icond": icond
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, 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
|
| predict |
Ran ran on a synthesized input |
mlysy/rodeo/src/rodeo/kalmantv/standard.py code served (permissive licence) · get_code("38225b69bc66f85b") 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 jax.numpy as jnp
import numpy as np
# Set random seed for reproducibility
np.random.seed(0)
# Define state dimension
n_state = 4
# Create valid arguments for the predict function
mean_state_past = jnp.array([1.0, 2.0, 3.0, 4.0])
var_state_past = jnp.array([
[1.0, 0.1, 0.0, 0.0],
[0.1, 1.0, 0.1, 0.0],
[0.0, 0.1, 1.0, 0.1],
[0.0, 0.0, 0.1, 1.0]
])
mean_state = jnp.array([0.5, 0.5, 0.5, 0.5])
wgt_state = jnp.array([
[0.9, 0.0, 0.0, 0.0],
[0.0, 0.9, 0.0, 0.0],
[0.0, 0.0, 0.9, 0.0],
[0.0, 0.0, 0.0, 0.9]
])
var_state = jnp.array([
[0.1, 0.0, 0.0, 0.0],
[0.0, 0.1, 0.0, 0.0],
[0.0, 0.0, 0.1, 0.0],
[0.0, 0.0, 0.0, 0.1]
])
ARGS = {
'mean_state_past': mean_state_past,
'var_state_past': var_state_past,
'mean_state': mean_state,
'wgt_state': wgt_state,
'var_state': var_state,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- jax, 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
|