Skip to content

Commit

Permalink
less decimals, increase stable runs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbdimitrov committed Jul 18, 2024
1 parent 406e2f4 commit 254d01c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions liana/tests/test_causalnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def test_caulsalnet():
verbose=False,
solver='scipy',
seed=1337,
max_runs=20,
stable_runs=10,
max_runs=50,
stable_runs=20,
)

assert problem.weights == [1.0, 0.01, 1.0, 1.0]
Expand All @@ -46,7 +46,9 @@ def test_causalnet_noweights():
output_scores,
node_weights={"N1": 1, "N2": 0},
verbose=False,
solver='scipy'
solver='scipy',
max_runs=50,
stable_runs=20,
)
assert df_res['source_pred_val'].values.sum() == 8
assert df_res['target_pred_val'].values.sum() == 9
4 changes: 2 additions & 2 deletions liana/tests/test_estimate_metalinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ def test_estimate_metalinks():
min_n=2)
assert np.isin(['metabolite', 'receptor'], list(mdata.mod.keys())).all()
assert (mdata.var.index == ['A', 'B', 'ITGB2', 'TNFRSF4']).all()
np.testing.assert_almost_equal(mdata.mod['metabolite'].X.mean(), -0.18889697, decimal=7)
np.testing.assert_almost_equal(mdata.mod['receptor'].X.mean(), 0.7754228, decimal=7)
np.testing.assert_almost_equal(mdata.mod['metabolite'].X.mean(), -0.18889697, decimal=5)
np.testing.assert_almost_equal(mdata.mod['receptor'].X.mean(), 0.7754228, decimal=5)

0 comments on commit 254d01c

Please sign in to comment.