Skip to content

Commit

Permalink
fit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dburkhardt committed Sep 14, 2020
1 parent a7baa1f commit b15aa99
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ def test_benchmarker_EES():
benchmarker = meld.Benchmarker(seed=0)

benchmarker.fit_phate(data, verbose=False)
# Test mean-center works
benchmarker.set_phate(benchmarker.data_phate + 1)

benchmarker.generate_ground_truth_pdf()
# Test with data_phate passed
benchmarker.generate_ground_truth_pdf(
benchmarker.data_phate
)

benchmarker.generate_RES()
benchmarker.calculate_EES(data=data) #implicitly tests graph
EES_mse = benchmarker.calculate_mse(benchmarker.EES)

np.testing.assert_allclose(4.962076e-05, EES_mse)

# Test mean-center works
benchmarker.set_phate(benchmarker.data_phate + 1)

# Test with data_phate passed
benchmarker.generate_ground_truth_pdf(
benchmarker.data_phate
)

def test_benchmarker_set_params():
benchmarker = meld.Benchmarker()
benchmarker.set_seed(0)
Expand Down

0 comments on commit b15aa99

Please sign in to comment.