e2f51920215f2c3be39de713626d1288c607eb75,test/test_auto_encoder.py,,test_rank1_auto_encoder,#,6
Before Change
for j in range(XY.shape[1]):
expected = XY[i, j]
predicted = XY_completed[i, j]
assert abs(expected - predicted) < 0.1, \
"Expected %0.4f but got %0.4f at XY[%d,%d]" % (
expected,
predicted,
i,
j)
if __name__ == "__main__":
test_rank1_auto_encoder()
After Change
print(XY)
print(XY_completed)
print(missing_mask)
diff = XY - XY_completed
missing_mse = np.mean(diff[missing_mask] ** 2)
missing_mae = np.mean(np.abs(diff[missing_mask]))
print("MSE: %0.4f, MAE: %0.4f" % (missing_mse, missing_mae))
assert missing_mae < 0.1, "Error too high!"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: iskandr/fancyimpute
Commit Name: e2f51920215f2c3be39de713626d1288c607eb75
Time: 2015-12-28
Author: alex.rubinsteyn@gmail.com
File Name: test/test_auto_encoder.py
Class Name:
Method Name: test_rank1_auto_encoder
Project Name: deepchem/deepchem
Commit Name: 482360f06eebf18a460373ea00cd9920e2c8a37a
Time: 2017-08-03
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/tests/test_layers.py
Class Name: TestLayers
Method Name: test_reshape_inputs
Project Name: nilearn/nilearn
Commit Name: aa1724445ba6bb8a12603fb1017691520b61b240
Time: 2014-02-18
Author: virgile.fritsch@gmail.com
File Name: nilearn/mass_univariate/tests/test_permuted_least_squares.py
Class Name:
Method Name: test_permuted_ols_check_h0