Models for Exact GP Inference


class gpytorch.models.ExactGP(train_inputs, train_targets, likelihood)[source]
get_fantasy_model(inputs, targets, **kwargs)[source]

Returns a new GP model that incorporates the specified inputs and targets as new training data.

Using this method is more efficient than updating with set_train_data when the number of inputs is relatively small, because any computed test-time caches will be updated in linear time rather than computed from scratch.


If targets is a batch (e.g. b x m), then the GP returned from this method will be a batch mode GP.

  • inputs (Tensor m x d or b x m x d): Locations of fantasy observations.
  • targets (Tensor m or b x m): Labels of fantasy observations.
  • ExactGP
    An ExactGP model with n + m training examples, where the m fantasy examples have been added and all test-time caches have been updated.
set_train_data(inputs=None, targets=None, strict=True)[source]

Set training data (does not re-fit model hyper-parameters)

Models for Variational GP Inference


class gpytorch.models.VariationalGP(train_input)[source]


class gpytorch.models.GridInducingVariationalGP(grid_size, grid_bounds)[source]


class gpytorch.models.AdditiveGridInducingVariationalGP(grid_size, grid_bounds, num_dim, mixing_params=False, sum_output=True)[source]