aepsych.utils

aepsych.utils module

aepsych.utils.make_scaled_sobol(lb, ub, size, seed=None)[source]
aepsych.utils.promote_0d(x)[source]
aepsych.utils.dim_grid(lower, upper, dim, gridsize=30)[source]

Create a grid Create a grid based on either model dimensions, or pass in lower, upper, and dim separately. :param model: Input Model object that defines:

  • lower (‘int’) - lower bound

  • upper (‘int’) - upper bound

  • dim (‘int) - dimension

Parameters
  • bound (- upper ('int') - upper) –

  • bound

  • dimension (- dim ('int) -) –

  • grid (- gridsize ('int') - size for) –

  • lower (Tensor) –

  • upper (Tensor) –

  • dim (int) –

  • gridsize (int) –

Returns

grid – Tensor

Return type

torch.FloatTensor

aepsych.utils.interpolate_monotonic(x, y, z, min_x=- inf, max_x=inf)[source]
aepsych.utils.get_lse_interval(model, mono_grid, target_level, cred_level=None, mono_dim=- 1, n_samps=500, lb=- inf, ub=inf, gridsize=30, **kwargs)[source]
aepsych.utils.get_lse_contour(post_mean, mono_grid, level, mono_dim=- 1, lb=- inf, ub=inf)[source]
aepsych.utils.get_jnd_1d(post_mean, mono_grid, df=1, mono_dim=- 1, lb=- inf, ub=inf)[source]
aepsych.utils.get_jnd_multid(post_mean, mono_grid, df=1, mono_dim=- 1, lb=- inf, ub=inf)[source]