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"
After Change
for i in np.arange(self.SNR_bins):
SNR_grids[i] = dist.expect(
lambda x: x, args=(self.logS_range,),
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
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
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: pymc-devs/pymc3
Commit Name: 21c16153ecd473a027df2af1e9a4fd3c71810e1a
Time: 2017-04-14
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/variational/callbacks.py
Class Name: CheckLossConvergence
Method Name: __call__
Project Name: pymc-devs/pymc3
Commit Name: d493caa1278c158b78aa02c8f23d4f56c311f975
Time: 2017-04-14
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/variational/callbacks.py
Class Name: CheckLossConvergence1
Method Name: __call__