faffde15ccbf5fa38459222fe86f19a2d8f2074a,test/labeling/model/test_label_model.py,LabelModelTest,test_model_loss,#LabelModelTest#,235
Before Change
self.assertAlmostEqual(label_model._loss_mu().item(), 0.675, 3)
def test_model_loss(self):
L = np.array([[1, 0, 1], [1, 2, 1]])
label_model = self._set_up_model(L)
label_model.train_model(L, n_epochs=1, lr=0.01, momentum=0.9)
init_loss = label_model._loss_mu().item()
After Change
self.assertAlmostEqual(label_model._loss_mu().item(), 0.675, 3)
def test_model_loss(self):
L = csr_matrix(np.array([[1, 0, 1], [1, 2, 1]]))
label_model = LabelModel(k=2, verbose=False)
label_model.train_model(L, n_epochs=1, lr=0.01, momentum=0.9)
init_loss = label_model._loss_mu().item()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_model_loss
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_optimizer
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_save_and_load
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_lr_scheduler