63751de9127ab46ab0374507338e89cd3a1be78f,GPy/inference/latent_function_inference/expectation_propagation.py,EPDTC,inference,#EPDTC#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,158

Before Change


                                            Y_metadata=Y_metadata,
                                            precision=tau_tilde,
                                            Lm=Lm, dL_dKmm=dL_dKmm,
                                            psi0=psi0, psi1=psi1, psi2=psi2, Z_tilde=np.log(Z_tilde).sum())

    def expectation_propagation(self, Kmm, Kmn, Y, likelihood, Y_metadata):
        num_data, output_dim = Y.shape

After Change


        else:
            Kmn = psi1.T

        if self.ep_mode=="nested":
            //Force EP at each step of the optimization
            self._ep_approximation = None
            mu, Sigma_diag, mu_tilde, tau_tilde, log_Z_tilde = self._ep_approximation = self.expectation_propagation(Kmm, Kmn, Y, likelihood, Y_metadata)
        elif self.ep_mode=="alternated":
            if getattr(self, "_ep_approximation", None) is None:
                //if we don"t yet have the results of runnign EP, run EP and store the computed factors in self._ep_approximation
                mu, Sigma_diag, mu_tilde, tau_tilde, log_Z_tilde = self._ep_approximation = self.expectation_propagation(Kmm, Kmn, Y, likelihood, Y_metadata)
            else:
                //if we"ve already run EP, just use the existing approximation stored in self._ep_approximation
                mu, Sigma_diag, mu_tilde, tau_tilde, log_Z_tilde = self._ep_approximation
        else:
            raise ValueError("ep_mode value not valid")

        return super(EPDTC, self).inference(kern, X, Z, likelihood, mu_tilde,
                                            mean_function=mean_function,
                                            Y_metadata=Y_metadata,
                                            precision=tau_tilde,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 16

Instances


Project Name: SheffieldML/GPy
Commit Name: 63751de9127ab46ab0374507338e89cd3a1be78f
Time: 2017-06-01
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EPDTC
Method Name: inference


Project Name: SheffieldML/GPy
Commit Name: 0c248e752052e18d2467d0e95f07046a666ae817
Time: 2017-03-22
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EP
Method Name: inference


Project Name: SheffieldML/GPy
Commit Name: 63751de9127ab46ab0374507338e89cd3a1be78f
Time: 2017-06-01
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EP
Method Name: inference


Project Name: SheffieldML/GPy
Commit Name: 0c248e752052e18d2467d0e95f07046a666ae817
Time: 2017-03-22
Author: morepabl@amazon.com
File Name: GPy/inference/latent_function_inference/expectation_propagation.py
Class Name: EPDTC
Method Name: inference