pymc.gp.TP#
- class pymc.gp.TP(*, mean_func=<pymc.gp.mean.Zero object>, scale_func=<pymc.gp.cov.Constant object>, cov_func=None, nu=None, parameterization=None)[source]#
Student’s T process prior.
The usage is nearly identical to that of gp.Latent. The differences are that it must be initialized with a degrees of freedom parameter, and TP is not additive. Given a mean and a kernel function, and a degrees of freedom parameter, the function \(f(x)\) is modeled as,
\[f(X) \sim \mathcal{TP}\left( \mu(X), k(X, X'), \nu \right)\]How the kernel \(k\) is interpreted is controlled by the
parameterizationargument. The default ("scale") treats \(k\) as the scale matrix of an underlyingMvStudentT, which makes the actual prior covariance equal to \(\nu / (\nu - 2) \, k\). The"covariance"option treats \(k\) as the actual covariance, matching the convention in Shah, Wilson, and Ghahramani (2014). The default will change to"covariance"in a future release; see theparameterizationparameter below for migration guidance.- Parameters:
- mean_func
Mean, defaultZero The mean function.
- scale_func2D array_like, or
Covariance, defaultConstant The kernel function. Interpreted as the scale matrix or the actual covariance depending on the
parameterizationargument.- cov_func2D array_like, or
Covariance, defaultNone Deprecated, previous version of “scale_func”
- nu
float The degrees of freedom. For
parameterization="covariance"the kernel only equals the prior covariance when \(\nu > 2\).- parameterization{“scale”, “covariance”}, optional
Whether the kernel returned by
scale_funcis treated as the scale matrix of the underlying multivariate Student-t ("scale", the current default) or as the actual covariance of the prior ("covariance", matching Shah, Wilson, and Ghahramani 2014). When left unspecified,"scale"is used and aFutureWarningis emitted because the default will change in a future release. Pass the value explicitly to silence the warning.
- mean_func
References
Shah, A., Wilson, A. G., and Ghahramani, Z. (2014). Student-t Processes as Alternatives to Gaussian Processes. arXiv preprint arXiv:1402.4306.
Methods
TP.__init__(*[, mean_func, scale_func, ...])TP.conditional(name, Xnew[, jitter])Return the conditional distribution evaluated over new input locations Xnew.
TP.marginal_likelihood(name, X, *args, **kwargs)TP.predict(Xnew[, point, given, diag, model])TP.prior(name, X[, reparameterize, jitter])Return the TP prior distribution evaluated over the input locations X.
Attributes
Xfnu