{"id":"wave_hedges","title":"Wave-Hedges distance","family":"lock-step","definition":"reference","intro_en":"Wave-Hedges normalizes each coordinate's absolute discrepancy by its larger magnitude and then adds the ratios. In contrast to a single global normalization, every active coordinate can contribute substantially regardless of its absolute scale. The animation illustrates the local maximum denominator on strictly positive data, avoiding an unstated zero-over-zero rule.","intro_zh":"Wave-Hedges 用每个坐标较大的幅值归一化该点误差，再求和。与全局归一化相比，每个非零坐标都可能产生明显贡献，不取决于其绝对规模。本例使用严格正值，避免未声明的 0/0 规则。","steps_en":["Keep the two series on the same sample grid; no shift or warping is estimated.","Scale each gap by its larger local magnitude; the highlighted point supplies one coordinate contribution.","Accumulate the coordinate contributions in sample order.","Add the local maximum-normalized discrepancies."],"steps_zh":["在同一采样网格上比较两条序列，不估计平移或时间规整。","逐坐标以较大绝对幅值归一化绝对差。","按采样顺序累积局部贡献。","累加各坐标归一化后的误差。"],"formula":"sum_i abs(x_i-y_i)/max(abs(x_i),abs(y_i))","caveats_en":["Sparse near-zero coordinates require a declared convention; signed inputs change the usual range.","Sample alignment and amplitude units are part of the comparison protocol."],"caveats_zh":["稀疏近零坐标需要声明约定；带符号输入会改变通常的取值范围。","采样对齐和幅值单位属于比较协议的一部分。"],"sources":[{"label":"Imported registry: explicit formula convention","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/data/ts_similarity_package_v2_registry.csv"}],"x":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1,2.8,3.8,4.1,3.3],"y":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6,2.6,3.1,4.4,3.9],"input_label":"Deterministic synthetic illustration; sample index is the time axis.","parameters":{"samples":12,"preprocessing":"none","domain":"strictly positive illustration"},"result":{"label":"distance","value":1.7894273039463604,"detail":"Exact formula evaluation on the displayed aligned vectors."},"frames":[{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5],"a_label":"x","b":[1.3,1.8],"b_label":"y","marker":1}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2],"b_label":"y","marker":4}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6],"b_label":"y","marker":7}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1,2.8,3.8,4.1,3.3],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6,2.6,3.1,4.4,3.9],"b_label":"y","marker":11}},{"phase":1,"caption":"Compute coordinate 1: Scale each gap by its larger local magnitude","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":0},"value":0.23076923076923078,"value_label":"coordinate term","input_highlight":[0]},{"phase":1,"caption":"Compute coordinate 4: Scale each gap by its larger local magnitude","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.13513513513513511,"value_label":"coordinate term","input_highlight":[3]},{"phase":1,"caption":"Compute coordinate 8: Scale each gap by its larger local magnitude","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.23809523809523808,"value_label":"coordinate term","input_highlight":[7]},{"phase":1,"caption":"Compute coordinate 12: Scale each gap by its larger local magnitude","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":11},"value":0.15384615384615388,"value_label":"coordinate term","input_highlight":[11]},{"phase":2,"caption":"Accumulate 1 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":0},"value":0.23076923076923078,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 2 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":1},"value":0.39743589743589747,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 4 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.6992376992376992,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 5 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":4},"value":0.8338530838530838,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 7 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":6},"value":1.0736649960787892,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 8 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":1.3117602341740273,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 10 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.0,0.0],"a_label":"contribution","marker":9},"value":1.567399331918388,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 12 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":11},"value":1.7894273039463604,"value_label":"running sum"},{"phase":3,"caption":"Add the local maximum-normalized discrepancies","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":0},"value":1.7894273039463604,"value_label":"final result"},{"phase":3,"caption":"Add the local maximum-normalized discrepancies","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":3},"value":1.7894273039463604,"value_label":"final result"},{"phase":3,"caption":"Add the local maximum-normalized discrepancies","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":7},"value":1.7894273039463604,"value_label":"final result"},{"phase":3,"caption":"Add the local maximum-normalized discrepancies","panel":{"kind":"bars","title":"Scale each gap by its larger local magnitude","a":[0.23076923076923078,0.16666666666666669,0.16666666666666663,0.13513513513513511,0.13461538461538464,0.13636363636363646,0.10344827586206891,0.23809523809523808,0.07142857142857134,0.1842105263157894,0.06818181818181834,0.15384615384615388],"a_label":"contribution","marker":11},"value":1.7894273039463604,"value_label":"final result"}],"animation_steps_en":["Keep samples on the same time grid.","Scale each gap by its larger local magnitude.","Accumulate the coordinate contributions.","Add the local maximum-normalized discrepancies."],"echotime_status":"Low-priority addition","echotime_api":""}
