MCPcopy
hub / github.com/stumpy-dev/stumpy / ostinato

Function ostinato

tests/naive.py:1274–1293  ·  view source on GitHub ↗
(Ts, m, Ts_subseq_isconstant=None)

Source from the content-addressed store, hash-verified

1272
1273
1274def ostinato(Ts, m, Ts_subseq_isconstant=None):
1275 if Ts_subseq_isconstant is None:
1276 Ts_subseq_isconstant = [None] * len(Ts)
1277
1278 Ts_subseq_isconstant = [
1279 rolling_isconstant(Ts[i], m, Ts_subseq_isconstant[i]) for i in range(len(Ts))
1280 ]
1281
1282 bsf_radius, bsf_Ts_idx, bsf_subseq_idx = consensus_search(
1283 Ts, m, Ts_subseq_isconstant
1284 )
1285 radius, Ts_idx, subseq_idx = get_central_motif(
1286 Ts,
1287 bsf_radius,
1288 bsf_Ts_idx,
1289 bsf_subseq_idx,
1290 m,
1291 Ts_subseq_isconstant,
1292 )
1293 return radius, Ts_idx, subseq_idx
1294
1295
1296def aamp_across_series_nearest_neighbors(Ts, Ts_idx, subseq_idx, m, p=2.0):

Callers

nothing calls this directly

Calls 3

consensus_searchFunction · 0.85
get_central_motifFunction · 0.85
rolling_isconstantFunction · 0.70

Tested by

no test coverage detected