c06ed12c51cce046e7a6faa8876c0b26e3e02b11,pyglmnet.py,glm,fit,#glm#Any#Any#Any#Any#Any#,137
Before Change
// Initialize parameters
if self.distr=="multinomial":
beta0_hat = np.random.normal(0.0,1.0, y.shape[1])
beta_hat = np.random.normal(0.0, 1.0, [p, y.shape[1]])
else:
beta0_hat = np.random.normal(0.0,1.0,1)
beta_hat = np.random.normal(0.0,1.0,[p,1])
fit = []
After Change
// convert to 1-hot encoding
y_bk = y
y = np.zeros([x.shape[0], y.max()+1])
for i in range(x.shape[0]):
y[i, y_bk[i]] = 1.
// number of predictions
if self.distr=="multinomial":
k = y.shape[1]
else:
k = 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: glm-tools/pyglmnet
Commit Name: c06ed12c51cce046e7a6faa8876c0b26e3e02b11
Time: 2016-04-27
Author: daniel.acuna@northwestern.edu
File Name: pyglmnet.py
Class Name: glm
Method Name: fit
Project Name: probcomp/bayeslite
Commit Name: 651346e6d36fcd7c3bece2187aea9dfd498136cf
Time: 2016-07-21
Author: fsaad@mit.edu
File Name: tests/test_cgpm.py
Class Name:
Method Name: test_unknown_stattype
Project Name: tiberiu44/TTS-Cube
Commit Name: 4a6cb19fc21993fe0505f3962da6bdfa94de4a0a
Time: 2018-11-10
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: synthesize