a8eabdad14eee8a47257248fa271700fcce939cb,autokeras/bayesian.py,IncrementalGaussianProcess,predict,#IncrementalGaussianProcess#Any#,101

Before Change


    def predict(self, train_x):
        k_trans = self.kernel(train_x, self._x)
        y_mean = k_trans.dot(self._alpha_vector)  // Line 4 (y_mean = f_star)
        return y_mean


def kernel(X, Y=None):
    if Y is None:

After Change



        // Check if any of the variances is negative because of
        // numerical issues. If yes: set the variance to 0.
        y_var_negative = y_var < 0
        if np.any(y_var_negative):
            warnings.warn("Predicted variances smaller than 0. "
                          "Setting those variances to 0.")
            y_var[y_var_negative] = 0.0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/autokeras
Commit Name: a8eabdad14eee8a47257248fa271700fcce939cb
Time: 2018-05-01
Author: jhfjhfj1@gmail.com
File Name: autokeras/bayesian.py
Class Name: IncrementalGaussianProcess
Method Name: predict


Project Name: NifTK/NiftyNet
Commit Name: 651f0ca63fc948c5b76a2ecfd9ee6bdfe60b0636
Time: 2017-08-21
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_windows_aggregator.py
Class Name: GridSamplesAggregator
Method Name: _is_stopping_signal


Project Name: NifTK/NiftyNet
Commit Name: 651f0ca63fc948c5b76a2ecfd9ee6bdfe60b0636
Time: 2017-08-21
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_windows_aggregator.py
Class Name: WindowAsImageAggregator
Method Name: _is_stopping_signal