x = np.asarray([0, 1, 3, 2], dtype=np.float64) y = np.asarray([1, 2, 2, 10], dtype=np.float64) x_normed = (x - np.mean(x)) / np.std(x) y_normed = (y - np.mean(y)) / np.std(y) z_normed_distance = np.sqrt(np.sum((x_normed - y_normed)**2))
x = np.asarray([0, 1, 3, 2], dtype=np.float64) y = np.asarray([1, 2, 2, 10], dtype=np.float64) x_normed = (x - np.mean(x)) / np.std(x) y_normed = (y - np.mean(y)) / np.std(y) z_normed_distance = np.sqrt(np.sum((x_normed - y_normed)**2))
x = np.asarray([0, 1, 3, 2], dtype=np.float64) y = np.asarray([1, 2, 2, 10], dtype=np.float64) x_normed = (x - np.mean(x)) / np.std(x) y_normed = (y - np.mean(y)) / np.std(y) z_normed_distance = np.sqrt(np.sum((x_normed - y_normed)**2))
stumpy.stump
m = 640
mp_steam = stumpy.stump(steam_flow, m)
motif_idx = np.argsort(mp_steam[:, 0])[0]
nearest_neighbor_idx = mp_steam[motif_idx, 1]
stump.fluss
m = L = 210 mp_adp = stumpy.stump(abp, m=m) cac, regime_locations = stumpy.fluss( mp_adp[:, 1], L=L, n_regimes=2, excl_factor=1, )
m = L = 210 mp_adp = stumpy.stump(abp, m=m) cac, regime_locations = stumpy.fluss( mp_adp[:, 1], L=L, n_regimes=2, excl_factor=1, )
stumpy.mass
stump.match
matches = stumpy.match(
query, ts,
max_distance=lambda D: max(np.mean(D) - 4 * np.std(D), np.min(D))
)
stump.allc
m = 20 mp_volume = stumpy.stump(volume, m=m) all_chain_set, unanchored_chain = stumpy.allc( mp_volume[:, 2], mp_volume[:, 3], )
m = 20 mp_volume = stumpy.stump(volume, m=m) all_chain_set, unanchored_chain = stumpy.allc( mp_volume[:, 2], mp_volume[:, 3], )
stumpy.stump
m = 500
under_pressure_mp = stumpy.stump(
T_A = under_pressure,
m = m,
T_B = ice_ice_baby,
ignore_trivial = False
)
under_pressure_motif_index = under_pressure_mp[:, 0].argmin()
vanilla_ice_motif_index = under_pressure_mp[under_pressur_motif_index, 1]
m = 38 P_Point_Point_mp = stumpy.stump(T_A=point, m=m) P_Point_Gun_mp = stumpy.stump(T_A=point, m=m, T_B=gun, ignore_trivial=False)
m = 38 P_Point_Point_mp = stumpy.stump(T_A=point, m=m) P_Point_Gun_mp = stumpy.stump(T_A=point, m=m, T_B=gun, ignore_trivial=False)
m = 38 P_Point_Point_mp = stumpy.stump(T_A=point, m=m) P_Point_Gun_mp = stumpy.stump(T_A=point, m=m, T_B=gun, ignore_trivial=False)
print(train_ts.shape) # (50, 150) # Uses `stumpy.mass` X_train = distance_to_shapelets(train_ts, point_shapelets) print(X_train.shape) # (50, 10) X_test = distance_to_shapelets(test_ts, point_shapelets)
print(train_ts.shape) # (50, 150) # Uses `stumpy.mass` X_train = distance_to_shapelets(train_ts, point_shapelets) print(X_train.shape) # (50, 10) X_test = distance_to_shapelets(test_ts, point_shapelets)
print(train_ts.shape) # (50, 150) # Uses `stumpy.mass` X_train = distance_to_shapelets(train_ts, point_shapelets) print(X_train.shape) # (50, 10) X_test = distance_to_shapelets(test_ts, point_shapelets)
stumpy.scrump
stump.stimp
stump.stumpi
Learn More: stumpy.readthedocs.io/en/latest/tutorials.html
Slides: github.com/thomasjpfan/pydata-nyc-meetup-2024-stumpy
Thomas J. Fan