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

Before Change


            SNR_weights[0] = SNR_weights[0] / 2.0
            SNR_weights[-1] = SNR_weights[-1] / 2.0
        elif self.SNR_prior == "lognorm":
            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(
                scipy.stats.norm.cdf(log_SNR_grids_upper[:-1],
                                     scale=self.logS_range))
            SNR_weights[0] = scipy.stats.norm.cdf(log_SNR_grids_upper[0],
                                                  scale=self.logS_range)
            SNR_weights[-1] = 1 - scipy.stats.norm.cdf(log_SNR_grids_upper[-2],
                                                       scale=self.logS_range)
            SNR_grids[0] = 0
        else:  // SNR_prior == "exp"
            SNR_grids = self._bin_exp(self.SNR_bins)
            SNR_weights = np.ones(self.SNR_bins) / self.SNR_bins

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: 9

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: rusty1s/pytorch_geometric
Commit Name: d8a075668b6e9cdf4c08f6c7285e5c7d2fbf5332
Time: 2017-10-17
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/graph/geometry.py
Class Name:
Method Name: edges_from_faces


Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: 4f9f28da19466e18165feb5a3dab0e82f686b926
Time: 2019-01-13
Author: jonas.rothfuss@gmx.de
File Name: tests/unittests_estimators.py
Class Name: TestConditionalDensityEstimators_2d_gaussian
Method Name: test_LSCD_with_2d_gaussian