aepsych.factory

Submodules

aepsych.factory.factory module

Module contents

aepsych.factory.default_mean_covar_factory(config=None, dim=None, stimuli_per_trial=1)[source]

Default factory for generic GP models

Parameters:
  • config (Config, optional) – Object containing bounds (and potentially other config details).

  • dim (int, optional) – Dimensionality of the parameter space. Must be provided if config is None.

  • stimuli_per_trial (int) – Number of stimuli per trial. Defaults to 1.

Returns:

Instantiated

ConstantMean and ScaleKernel with priors based on bounds.

Return type:

Tuple[gpytorch.means.Mean, gpytorch.kernels.Kernel]

aepsych.factory.ordinal_mean_covar_factory(config)[source]

Create a mean and covariance function for ordinal GPs.

Parameters:

config (Config) – Config object containing bounds.

Returns:

A tuple containing the mean function (ConstantMean) and the covariance function (ScaleKernel).

Return type:

Tuple[gpytorch.means.ConstantMean, gpytorch.kernels.ScaleKernel]

aepsych.factory.monotonic_mean_covar_factory(config)[source]

Default factory for monotonic GP models based on derivative observations.

Parameters:

config (Config) – Config containing (at least) bounds, and optionally LSE target.

Returns:

Instantiated mean and

scaled RBF kernels with partial derivative observations.

Return type:

Tuple[ConstantMeanPartialObsGrad, gpytorch.kernels.ScaleKernel]

aepsych.factory.song_mean_covar_factory(config)[source]

Factory that makes kernels like Song et al. 2018: Linear in intensity dimension (assumed to be the last dimension), RBF in context dimensions, summed.

Parameters:

config (Config) – Config object containing (at least) bounds and optionally LSE target.

Returns:

Instantiated

constant mean object and additive kernel object.

Return type:

Tuple[gpytorch.means.ConstantMean, gpytorch.kernels.AdditiveKernel]

aepsych.factory.pairwise_mean_covar_factory(config)[source]

Creates a mean and covariance function for pairwise GPs.

Parameters:

config (Config) – Config object containing bounds.

Returns:

A tuple containing the mean function (ConstantMean) and the covariance function (ScaleKernel).

Return type:

Tuple[gpytorch.means.ConstantMean, gpytorch.kernels.ScaleKernel]