Exemple #1
0
def test_CI_sham():
    import numpy as np
    from synergy.combination import CombinationIndex
    from synergy.datasets import sham

    d1, d2, E = sham()

    model = CombinationIndex()

    synergy = model.fit(d1, d2, E)
    assert np.abs(np.nanmean(np.log(synergy))) < 0.1
Exemple #2
0
def test_HSA_sham():
    import numpy as np
    from synergy.combination import HSA
    from synergy.datasets import sham

    d1, d2, E = sham()

    model = HSA()

    synergy = model.fit(d1, d2, E)
    assert np.nanmean(synergy)>0.08
Exemple #3
0
def test_bliss_sham():
    import numpy as np
    from synergy.combination import Bliss
    from synergy.datasets import sham

    d1, d2, E = sham()

    model = Bliss()

    synergy = model.fit(d1, d2, E)
    assert np.nanmean(synergy) < 0.1
Exemple #4
0
def test_loewe_delta_variant():
    import numpy as np
    from synergy.combination import Loewe
    from synergy.datasets import sham

    d1, d2, E = sham()

    model = Loewe(variant="delta")

    synergy = model.fit(d1, d2, E)
    assert np.nanmax(np.abs(synergy)) < 0.1
Exemple #5
0
def test_loewe_sham():
    import numpy as np
    from synergy.combination import Loewe
    from synergy.datasets import sham

    d1, d2, E = sham()

    model = Loewe()

    synergy = model.fit(d1, d2, E)
    assert np.abs(np.nanmean(np.log(synergy))) < 0.1
Exemple #6
0
def test_plotly_linearscale():
    import numpy as np
    from synergy.datasets import sham
    from synergy.utils.plots import plot_surface_plotly

    d1, d2, E = sham()
    d1 = np.hstack([d1, d1])
    d2 = np.hstack([d2, d2])
    E = np.hstack([E, E * 2])

    plot_surface_plotly(d1, d2, E, fname="x.html", logscale=False)
    assert 1 == 1
Exemple #7
0
def test_plotly_replicates():
    import numpy as np
    from synergy.datasets import sham
    from synergy.utils.plots import plot_surface_plotly

    d1, d2, E = sham()
    d1 = np.hstack([d1, d1])
    d2 = np.hstack([d2, d2])
    E = np.hstack([E, E * 2])

    plot_surface_plotly(d1, d2, E, fname="x.html")
    assert 1 == 1
Exemple #8
0
def test_heatmap_linearscale():
    import numpy as np
    from synergy.datasets import sham
    from synergy.utils.plots import plot_heatmap

    d1, d2, E = sham()
    d1 = np.hstack([d1, d1])
    d2 = np.hstack([d2, d2])
    E = np.hstack([E, E * 2])

    plot_heatmap(d1, d2, E, fname="x.pdf", logscale=False)
    assert 1 == 1
Exemple #9
0
def test_heatmap_replicates():
    import numpy as np
    from synergy.datasets import sham
    from synergy.utils.plots import plot_heatmap

    d1, d2, E = sham()
    d1 = np.hstack([d1, d1])
    d2 = np.hstack([d2, d2])
    E = np.hstack([E, E * 2])

    plot_heatmap(d1, d2, E, fname="x.pdf")
    assert 1 == 1