3939__all__ = ["TP" , "Latent" , "LatentKron" , "Marginal" , "MarginalApprox" , "MarginalKron" ]
4040
4141
42- _noise_deprecation_warning = (
43- "The 'noise' parameter has been been changed to 'sigma' "
44- "in order to standardize the GP API and will be "
45- "deprecated in future releases."
46- )
47-
48-
49- def _handle_sigma_noise_parameters (sigma , noise ):
50- """Help transition of 'noise' parameter to be named 'sigma'."""
51- if (sigma is None and noise is None ) or (sigma is not None and noise is not None ):
52- raise ValueError ("'sigma' argument must be specified." )
53-
54- if sigma is None :
55- warnings .warn (_noise_deprecation_warning , FutureWarning )
56- return noise
57-
58- return sigma
59-
60-
6142class Base :
6243 """Base class."""
6344
@@ -505,8 +486,6 @@ def marginal_likelihood(
505486 sigma : float, Variable, or Covariance, default ~pymc.gp.cov.WhiteNoise
506487 Standard deviation of the Gaussian noise. Can also be a Covariance for
507488 non-white noise.
508- noise : float, Variable, or Covariance, optional
509- Deprecated. Previous parameterization of `sigma`.
510489 jitter : float, default 1e-6
511490 A small correction added to the diagonal of positive semi-definite
512491 covariance matrices to ensure numerical stability.
@@ -516,8 +495,6 @@ def marginal_likelihood(
516495 Extra keyword arguments that are passed to :class:`~pymc.MvNormal` distribution
517496 constructor.
518497 """
519- sigma = _handle_sigma_noise_parameters (sigma = sigma , noise = noise )
520-
521498 noise_func = sigma if isinstance (sigma , BaseCovariance ) else pm .gp .cov .WhiteNoise (sigma )
522499 mu , cov = self ._build_marginal_likelihood (X = X , noise_func = noise_func , jitter = jitter )
523500 self .X = X
@@ -544,10 +521,6 @@ def _get_given_vals(self, given):
544521 cov_total = self .cov_func
545522 mean_total = self .mean_func
546523
547- if "noise" in given :
548- warnings .warn (_noise_deprecation_warning , FutureWarning )
549- given ["sigma" ] = given ["noise" ]
550-
551524 if all (val in given for val in ["X" , "y" , "sigma" ]):
552525 X , y , sigma = given ["X" ], given ["y" ], given ["sigma" ]
553526 noise_func = sigma if isinstance (sigma , BaseCovariance ) else pm .gp .cov .WhiteNoise (sigma )
@@ -804,9 +777,7 @@ def _build_marginal_likelihood_loglik(self, y, X, Xu, sigma, jitter):
804777 quadratic = 0.5 * (pt .dot (r , r_l ) - pt .dot (c , c ))
805778 return - 1.0 * (constant + logdet + quadratic + trace )
806779
807- def marginal_likelihood (
808- self , name , X , Xu , y , sigma = None , noise = None , jitter = JITTER_DEFAULT , ** kwargs
809- ):
780+ def marginal_likelihood (self , name , X , Xu , y , sigma = None , jitter = JITTER_DEFAULT , ** kwargs ):
810781 R"""
811782 Return the approximate marginal likelihood distribution.
812783
@@ -827,8 +798,6 @@ def marginal_likelihood(
827798 noise. Must have shape `(n, )`.
828799 sigma : float, Variable
829800 Standard deviation of the Gaussian noise.
830- noise : float, Variable, optional
831- Previous parameterization of `sigma`.
832801 jitter : float, default 1e-6
833802 A small correction added to the diagonal of positive semi-definite
834803 covariance matrices to ensure numerical stability.
@@ -840,7 +809,7 @@ def marginal_likelihood(
840809 self .Xu = Xu
841810 self .y = y
842811
843- self .sigma = _handle_sigma_noise_parameters ( sigma = sigma , noise = noise )
812+ self .sigma = sigma
844813
845814 approx_loglik = self ._build_marginal_likelihood_loglik (
846815 y = self .y , X = self .X , Xu = self .Xu , sigma = self .sigma , jitter = jitter
0 commit comments