8a6ecfdb1759ad2f67492a983ec5f90b5c5dd3ae,brainiak/reprsimil/brsa.py,GBRSA,_set_SNR_grids,#GBRSA#,4087

Before Change


            log_SNR_grids = ((np.arange(self.SNR_bins)
                              - (self.SNR_bins - 1) / 2)) \
                / self.SNR_bins * self.logS_range * 6
            SNR_grids = np.exp(log_SNR_grids)
            log_SNR_grids_upper = log_SNR_grids + self.logS_range * 3 \
                / self.SNR_bins
            SNR_weights = np.empty(self.SNR_bins)
            SNR_weights[1:-1] = np.diff(

After Change


                    lb=bounds[i], ub=bounds[i + 1]) * self.SNR_bins
            // Center of mass of each segment between consecutive
            // bounds are set as the grids for SNR.
            SNR_weights = np.ones(self.SNR_bins) / self.SNR_bins
        else:  // SNR_prior == "exp"
            SNR_grids = self._bin_exp(self.SNR_bins)
            SNR_weights = np.ones(self.SNR_bins) / self.SNR_bins
        SNR_weights = SNR_weights / np.sum(SNR_weights)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: brainiak/brainiak
Commit Name: 8a6ecfdb1759ad2f67492a983ec5f90b5c5dd3ae
Time: 2017-08-30
Author: lcnature@users.noreply.github.com
File Name: brainiak/reprsimil/brsa.py
Class Name: GBRSA
Method Name: _set_SNR_grids


Project Name: cornellius-gp/gpytorch
Commit Name: 0b056a895e7729f6ade61a30e9fcb853dc4e371e
Time: 2019-04-05
Author: jrg365@cornell.edu
File Name: test/examples/test_white_noise_regression.py
Class Name: TestWhiteNoiseGPRegression
Method Name: test_posterior_latent_gp_and_likelihood_without_optimization


Project Name: cornellius-gp/gpytorch
Commit Name: 0b056a895e7729f6ade61a30e9fcb853dc4e371e
Time: 2019-04-05
Author: jrg365@cornell.edu
File Name: test/examples/test_white_noise_regression.py
Class Name: TestWhiteNoiseGPRegression
Method Name: test_posterior_latent_gp_and_likelihood_with_optimization