How to use the matrixprofile.scrimp.calc_exclusion_stop function in matrixprofile

To help you get started, we’ve selected a few matrixprofile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github target / matrixprofile-ts / tests / test_scrimp.py View on Github external
ts = [1, 2, 3, 4, 5, 6, 7, 8]
    m = 4
    idx = 0
    profile_len = scrimp.calc_profile_len(len(ts), m)  # 4
    exclusion_zone = scrimp.calc_exclusion_zone(m)  # 1
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 1
    assert(expected_stop == stop)

    idx = 2
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 3
    assert(expected_stop == stop)

    idx = 3
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 4
    assert(expected_stop == stop)

    idx = 4
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 5
    assert(expected_stop == stop)
github target / matrixprofile-ts / tests / test_scrimp.py View on Github external
def test_calc_exclusion_stop():
    ts = [1, 2, 3, 4, 5, 6, 7, 8]
    m = 4
    idx = 0
    profile_len = scrimp.calc_profile_len(len(ts), m)  # 4
    exclusion_zone = scrimp.calc_exclusion_zone(m)  # 1
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 1
    assert(expected_stop == stop)

    idx = 2
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 3
    assert(expected_stop == stop)

    idx = 3
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 4
    assert(expected_stop == stop)

    idx = 4
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 5
    assert(expected_stop == stop)
github target / matrixprofile-ts / tests / test_scrimp.py View on Github external
stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 1
    assert(expected_stop == stop)

    idx = 2
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 3
    assert(expected_stop == stop)

    idx = 3
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 4
    assert(expected_stop == stop)

    idx = 4
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 5
    assert(expected_stop == stop)
github target / matrixprofile-ts / tests / test_scrimp.py View on Github external
def test_calc_exclusion_stop():
    ts = [1, 2, 3, 4, 5, 6, 7, 8]
    m = 4
    idx = 0
    profile_len = scrimp.calc_profile_len(len(ts), m)  # 4
    exclusion_zone = scrimp.calc_exclusion_zone(m)  # 1
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 1
    assert(expected_stop == stop)

    idx = 2
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 3
    assert(expected_stop == stop)

    idx = 3
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 4
    assert(expected_stop == stop)

    idx = 4
    stop = scrimp.calc_exclusion_stop(idx, exclusion_zone, profile_len)
    expected_stop = 5