MCPcopy Index your code
hub / github.com/stumpy-dev/stumpy / naive_rea

Function naive_rea

tests/test_floss.py:84–94  ·  view source on GitHub ↗
(cac, n_regimes, L, excl_factor)

Source from the content-addressed store, hash-verified

82
83
84def naive_rea(cac, n_regimes, L, excl_factor):
85 cac_list = cac.tolist()
86 loc_regimes = [None] * (n_regimes - 1)
87 for i in range(n_regimes - 1):
88 loc_regimes[i] = cac_list.index(min(cac_list))
89 excl_start = max(loc_regimes[i] - L * excl_factor, 0)
90 excl_stop = min(loc_regimes[i] + L * excl_factor, len(cac_list))
91 for excl in range(excl_start, excl_stop):
92 cac_list[excl] = 1.0
93
94 return np.array(loc_regimes, dtype=np.int64)
95
96
97test_data = [np.random.randint(0, 50, size=50, dtype=np.int64)]

Callers 2

test_reaFunction · 0.85
test_flussFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected