{"id":"znorm_manhattan","title":"Z-normalized Manhattan","family":"lock-step","definition":"reference","intro_en":"Z-normalized Manhattan first removes each sequence's own mean and divides by its standard deviation. The final Manhattan comparison therefore emphasizes the shape remaining on a common time grid. The input illustration deliberately includes an offset and gain difference so the normalized traces visibly differ from the raw signals.","intro_zh":"Z 标准化 Manhattan 比较先分别减去每条序列的均值，再除以各自标准差，随后在共同时间网格上比较标准化形状。本例刻意加入偏移和增益差，使原始信号与标准化后的曲线形成清晰对照。","steps_en":["Estimate each series' own mean and population standard deviation.","Subtract that mean and divide by that standard deviation.","Accumulate absolute normalized gaps.","Keep the absolute-gap total."],"steps_zh":["分别估计每条序列的均值和总体标准差。","分别去均值并除以标准差。","累加标准化后的绝对差。","保留绝对差总和。"],"formula":"||z(x)-z(y)||_1; z(x)=(x-mean(x))/std(x, ddof=0)","caveats_en":["Positive gain and offset information is deliberately removed; distinct raw series can have zero distance.","Constant sequences need a separately declared convention; this illustration has positive variance."],"caveats_zh":["正增益和偏移信息被主动去除；不同原序列可能距离为零。","常量序列必须另行规定处理方式；本例方差严格为正。"],"sources":[{"label":"Imported registry: normalization convention","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/data/ts_similarity_package_v2_registry.csv"},{"label":"SciPy: cityblock","url":"https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.cityblock.html"}],"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":[5.34,6.24,6.6,8.760000000000002,12.360000000000001,10.920000000000002,8.219999999999999,5.880000000000001,7.680000000000001,8.58,10.920000000000002,10.02],"input_label":"Deterministic synthetic illustration; sample index is the time axis.","parameters":{"ddof":0,"norm":1,"means":[2.966666666666667,8.46],"standard_deviations":[1.0378931651293508,2.1466252583997987]},"result":{"label":"distance","value":4.407903268142682,"detail":""},"frames":[{"phase":0,"caption":"Each series independently z-normalized","panel":{"kind":"lines","title":"Each series independently z-normalized","a":[-1.8948642622784442,-1.4131191108517211],"a_label":"x","b":[-1.4534441853748634,-1.0341814395936528],"b_label":"y","marker":1}},{"phase":0,"caption":"Each series independently z-normalized","panel":{"kind":"lines","title":"Each series independently z-normalized","a":[-1.8948642622784442,-1.4131191108517211,-0.5459778382836197,0.7065595554258606,1.4773517977086172],"a_label":"x","b":[-1.4534441853748634,-1.0341814395936528,-0.8664763412811688,0.13975424859373714,1.8168052317185788],"b_label":"y","marker":4}},{"phase":0,"caption":"Each series independently z-normalized","panel":{"kind":"lines","title":"Each series independently z-normalized","a":[-1.8948642622784442,-1.4131191108517211,-0.5459778382836197,0.7065595554258606,1.4773517977086172,0.8029085857112048,-0.3532797777129303,-0.8350249291396533],"a_label":"x","b":[-1.4534441853748634,-1.0341814395936528,-0.8664763412811688,0.13975424859373714,1.8168052317185788,1.1459848384686424,-0.11180339887499038,-1.2018865379061368],"b_label":"y","marker":7}},{"phase":0,"caption":"Each series independently z-normalized","panel":{"kind":"lines","title":"Each series independently z-normalized","a":[-1.8948642622784442,-1.4131191108517211,-0.5459778382836197,0.7065595554258606,1.4773517977086172,0.8029085857112048,-0.3532797777129303,-0.8350249291396533,-0.16058171714224131,0.8029085857112048,1.0919556765672385,0.32116343428448174],"a_label":"x","b":[-1.4534441853748634,-1.0341814395936528,-0.8664763412811688,0.13975424859373714,1.8168052317185788,1.1459848384686424,-0.11180339887499038,-1.2018865379061368,-0.36336104634371585,0.055901699437494366,1.1459848384686424,0.7267220926874308],"b_label":"y","marker":11}},{"phase":1,"caption":"Compute coordinate 1: Absolute normalized gaps","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,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.44142007690358076,"value_label":"coordinate term","input_highlight":[0]},{"phase":1,"caption":"Compute coordinate 4: Absolute normalized gaps","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.5668053068321235,"value_label":"coordinate term","input_highlight":[3]},{"phase":1,"caption":"Compute coordinate 8: Absolute normalized gaps","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.36686160876648344,"value_label":"coordinate term","input_highlight":[7]},{"phase":1,"caption":"Compute coordinate 12: Absolute normalized gaps","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":11},"value":0.4055586584029491,"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.44142007690358076,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.44142007690358076,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 2 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,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.8203577481616491,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 4 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":1.7076615579913217,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 5 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":4},"value":2.0471149920012834,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 7 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":6},"value":2.6316676235966607,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 8 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":2.9985292323631443,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 10 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.0,0.0],"a_label":"contribution","marker":9},"value":3.948315447838329,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 12 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":11},"value":4.407903268142682,"value_label":"running sum"},{"phase":3,"caption":"Manhattan distance in z-normalized coordinates","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":0},"value":4.407903268142682,"value_label":"final result"},{"phase":3,"caption":"Manhattan distance in z-normalized coordinates","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":3},"value":4.407903268142682,"value_label":"final result"},{"phase":3,"caption":"Manhattan distance in z-normalized coordinates","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":7},"value":4.407903268142682,"value_label":"final result"},{"phase":3,"caption":"Manhattan distance in z-normalized coordinates","panel":{"kind":"bars","title":"Absolute normalized gaps","a":[0.44142007690358076,0.3789376712580683,0.3204985029975491,0.5668053068321235,0.33945343400996153,0.3430762527574376,0.2414763788379399,0.36686160876648344,0.20277932920147454,0.7470068862737105,0.054029161901403944,0.4055586584029491],"a_label":"contribution","marker":11},"value":4.407903268142682,"value_label":"final result"}],"animation_steps_en":["Estimate each series' mean and standard deviation.","Z-normalize each series independently.","Accumulate absolute normalized gaps.","Keep the absolute-gap sum."],"echotime_status":"Low-priority addition","echotime_api":""}
