ConstantMean(constant_prior: Optional[gpytorch.priors.prior.Prior] = None, constant_constraint: Optional[gpytorch.constraints.constraints.Interval] = None, batch_shape: torch.Size = torch.Size(), **kwargs)¶
A (non-zero) constant prior mean function, i.e.:\[\mu(\mathbf x) = C\]
where \(C\) is a learned constant.
- constant_prior (Prior, optional) – Prior for constant parameter \(C\).
- constant_constraint (Interval, optional) – Constraint for constant parameter \(C\).
- batch_shape (torch.Size, optional) – The batch shape of the learned constant(s) (default: ).
constant (torch.Tensor) – \(C\) parameter
gpytorch.means.Meanimplementation for defining a different mean for each task in a multitask model. Expects a list of num_tasks different mean functions, each of which is applied to the given data in
forward()and returned as an n x t matrix of means, one for each task.
Evaluate each mean in self.base_means on the input data, and return as an n x t matrix of means.