adfa6de1d87baced85215985da9ed2ce671c2a93,GPy/kern/rbf.py,rbf,_K_computations,#rbf#Any#Any#,185

Before Change


            self._X = X
            self._X2 = X2
            if X2 is None: X2 = X
            self._K_dist = X[:,None,:]-X2[None,:,:] // this can be computationally heavy
            self._params = np.empty(shape=(1,0))    //ensure the next section gets called
        if not np.all(self._params == self._get_params()):
            self._params == self._get_params()
            self._K_dist2 = np.square(self._K_dist/self.lengthscale)
            self._K_dvar = np.exp(-0.5*self._K_dist2.sum(-1))

    def _psi_computations(self,Z,mu,S):
        //here are the "statistics" for psi1 and psi2

After Change


            //_K_dist2 = np.square(_K_dist/self.lengthscale)
            X = X/self.lengthscale
            X2 = X2/self.lengthscale
            self._K_dist2 = (-2.*np.dot(X, X2.T) + np.sum(np.square(X),1)[:,None] + np.sum(np.square(X2),1)[None,:])
            self._K_dvar = np.exp(-0.5*self._K_dist2)

    def _psi_computations(self,Z,mu,S):
        //here are the "statistics" for psi1 and psi2
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: SheffieldML/GPy
Commit Name: adfa6de1d87baced85215985da9ed2ce671c2a93
Time: 2013-03-27
Author: james.hensman@gmail.com
File Name: GPy/kern/rbf.py
Class Name: rbf
Method Name: _K_computations


Project Name: librosa/librosa
Commit Name: d8ab8131e19498c2b9bed8d218e4e46eedc7cf21
Time: 2012-10-20
Author: brm2132@columbia.edu
File Name: librosa/tf_agc.py
Class Name:
Method Name: tf_agc


Project Name: SheffieldML/GPy
Commit Name: e7650c8a90de31e3d4877fcbfbc217a9b1202ebf
Time: 2015-04-20
Author: ibinbei@gmail.com
File Name: GPy/core/sparse_gp.py
Class Name: SparseGP
Method Name: _raw_predict