Beispiel #1
0
def test_subspace_discords(T, m):
    discord_idx = 1
    nn_idx = 4

    for k in range(T.shape[0]):
        ref_S = naive.subspace(T, m, discord_idx, nn_idx, k, discords=True)
        comp_S = subspace(T, m, discord_idx, nn_idx, k, discords=True)
        npt.assert_almost_equal(ref_S, comp_S)
Beispiel #2
0
def test_subspace(T, m):
    motif_idx = 1
    nn_idx = 4

    for k in range(T.shape[0]):
        ref_S = naive.subspace(T, m, motif_idx, nn_idx, k)
        comp_S = subspace(T, m, motif_idx, nn_idx, k)
        npt.assert_almost_equal(ref_S, comp_S)
Beispiel #3
0
def test_subspace_include(T, m):
    motif_idx = 1
    nn_idx = 4
    for width in range(T.shape[0]):
        for i in range(T.shape[0] - width):
            include = np.asarray(range(i, i + width + 1))

            for k in range(T.shape[0]):
                ref_S = naive.subspace(T, m, motif_idx, nn_idx, k, include)
                comp_S = subspace(T, m, motif_idx, nn_idx, k, include)
                npt.assert_almost_equal(ref_S, comp_S)