コード例 #1
0
def test_aampdist(T_A, T_B):
    m = 3
    for p in [1.0, 2.0, 3.0]:
        ref_mpdist = naive.aampdist(T_A, T_B, m, p=p)
        comp_mpdist = aampdist(T_A, T_B, m, p=p)

        npt.assert_almost_equal(ref_mpdist, comp_mpdist)
コード例 #2
0
def test_mpdist():
    T_A = np.random.uniform(-1000, 1000, [8]).astype(np.float64)
    T_B = np.random.uniform(-1000, 1000, [64]).astype(np.float64)
    m = 5

    ref = stumpy.aampdist(T_A, T_B, m)
    comp = stumpy.mpdist(T_A, T_B, m, normalize=False)
    npt.assert_almost_equal(ref, comp)
コード例 #3
0
def test_aampdist_k(T_A, T_B, k):
    m = 3
    ref_mpdist = naive.aampdist(T_A, T_B, m, k=k)
    comp_mpdist = aampdist(T_A, T_B, m, k=k)

    npt.assert_almost_equal(ref_mpdist, comp_mpdist)
コード例 #4
0
def test_aampdist_percentage(T_A, T_B, percentage):
    m = 3
    ref_mpdist = naive.aampdist(T_A, T_B, m, percentage=percentage)
    comp_mpdist = aampdist(T_A, T_B, m, percentage=percentage)

    npt.assert_almost_equal(ref_mpdist, comp_mpdist)