{"id":"sax_mindist","title":"SAX MINDIST lower bound","family":"feature-based","definition":"reference","intro_en":"Compare SAX words using the minimum gap between their symbol intervals, sum squared gaps and multiply by the PAA length factor. Equal or adjacent symbols contribute zero. In this example all paired symbols are adjacent, demonstrating why a valid lower bound can be zero for distinct series.","intro_zh":"以 SAX 符号区间之间的最小间隔比较两个单词，累加间隔平方后加入 PAA 长度系数。相同或相邻符号贡献为零。本例各对应符号都相邻，展示了有效下界为何可对不同序列返回零。","steps_en":["Z-normalize each complete series and use four equal PAA blocks.","Quantize each mean with shared standard-normal quartile breakpoints.","Look up the minimum gap between the two symbol intervals.","Take sqrt(n/w)*sqrt(sum(gap^2)); this is a lower-bound calculation."],"steps_zh":["对各完整序列做 z 标准化，并计算四个等长 PAA 区间。","使用共享标准正态四分位断点量化各区间均值。","查找两个符号区间之间的最小间隔。","计算 sqrt(n/w)*sqrt(sum(gap^2))，得到下界。"],"formula":"MINDIST = sqrt(16/4)*sqrt(sum_i interval_gap(SAX_i(x),SAX_i(y))^2)","caveats_en":["Gaussian breakpoints are a coding convention; they do not make arbitrary observed signals normally distributed.","The Euclidean lower-bound interpretation requires the same normalized length, partitions and ordered breakpoints; lower-bounding does not imply metric axioms.","Both PAA aggregation and quantization can map distinct signals to the same code."],"caveats_zh":["高斯断点是一种编码约定，不会使任意观测信号变成正态分布。","欧氏下界解释要求相同的标准化长度、分段和有序断点；具有下界性质不等于满足度量公理。","PAA 聚合和量化都可能把不同信号映射为相同代码。"],"sources":[{"label":"Lin et al. (2007), Experiencing SAX, author copy","url":"https://www.cs.ucr.edu/~stelo/papers/DMKD07b.pdf"},{"label":"Exact illustrative inputs and encoder definitions","url":"https://github.com/ZipengWu365/EchoTime/blob/main/tools/method_animation_data/feature_model_embedding.py"}],"x":[0.0,0.8769216919004693,0.8094744111674236,0.7863961030678929,0.3905255888325767,-0.5769216919004693,-0.6000000000000001,-0.09587051423531628,0.2094744111674235,1.0863961030678926,1.5905255888325764,0.9958705142353173,0.6000000000000002,0.20412948576468337,-0.39052558883257615,0.11360389693210537],"y":[-0.2003300858899106,0.185,0.5703300858899106,1.005,1.0003300858899107,0.3250000000000002,-0.35033008588991066,-0.3550000000000001,0.07966991411008931,0.46499999999999997,0.8503300858899105,1.2849999999999995,1.2803300858899114,0.6050000000000002,-0.07033008588991083,-0.07500000000000043],"parameters":{"length":16,"word_length":4,"alphabet_size":4,"breakpoints":[-0.6744897501960817,0.0,0.6744897501960817],"z_normalization_ddof":0,"x_word":"cadb","y_word":"bbcc"},"result":{"label":"lower bound","value":0.0,"detail":"Compare with actual z-normalized Euclidean distance 3.3214665."},"frames":[{"phase":0,"caption":"Standardize each full sequence to mean zero and population variance one.","panel":{"kind":"lines","title":"Z-normalized sequences","a":[-0.6144265168604166,0.8223839917095805,0.7118735976495486,0.6740604657545454],"a_label":"z(x)","b":[-1.1361741175234368,-0.42178022536415644,0.2926136667951239,1.0984825649593963],"b_label":"z(y)"},"input_highlight":[0,1,2,3]},{"phase":0,"caption":"Standardize each full sequence to mean zero and population variance one.","panel":{"kind":"lines","title":"Z-normalized sequences","a":[-0.6144265168604166,0.8223839917095805,0.7118735976495486,0.6740604657545454,0.025438222582952426,-1.5596958119420803,-1.5975089438370838,-0.7715075465436764],"a_label":"z(x)","b":[-1.1361741175234368,-0.42178022536415644,0.2926136667951239,1.0984825649593963,1.0898246422086943,-0.16222316360159827,-1.4142709694118916,-1.4229288921625938],"b_label":"z(y)"},"input_highlight":[0,1,2,3,4,5,6,7]},{"phase":0,"caption":"Standardize each full sequence to mean zero and population variance one.","panel":{"kind":"lines","title":"Z-normalized sequences","a":[-0.6144265168604166,0.8223839917095805,0.7118735976495486,0.6740604657545454,0.025438222582952426,-1.5596958119420803,-1.5975089438370838,-0.7715075465436764,-0.2712088293271185,1.1656016792428783,1.9916030765362855,1.017278153287845],"a_label":"z(x)","b":[-1.1361741175234368,-0.42178022536415644,0.2926136667951239,1.0984825649593963,1.0898246422086943,-0.16222316360159827,-1.4142709694118916,-1.4229288921625938,-0.6170599939983212,0.09733389816095916,0.8117277903202393,1.6175966884845112],"b_label":"z(y)"},"input_highlight":[0,1,2,3,4,5,6,7,8,9,10,11]},{"phase":0,"caption":"Standardize each full sequence to mean zero and population variance one.","panel":{"kind":"lines","title":"Z-normalized sequences","a":[-0.6144265168604166,0.8223839917095805,0.7118735976495486,0.6740604657545454,0.025438222582952426,-1.5596958119420803,-1.5975089438370838,-0.7715075465436764,-0.2712088293271185,1.1656016792428783,1.9916030765362855,1.017278153287845,0.3686559101162506,-0.27996633305534346,-1.2542912563037847,-0.4282898590103812],"a_label":"z(x)","b":[-1.1361741175234368,-0.42178022536415644,0.2926136667951239,1.0984825649593963,1.0898246422086943,-0.16222316360159827,-1.4142709694118916,-1.4229288921625938,-0.6170599939983212,0.09733389816095916,0.8117277903202393,1.6175966884845112,1.6089387657338112,0.35689095992351744,-0.8951568458867762,-0.9038147686374788],"b_label":"z(y)"},"input_highlight":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},{"phase":1,"caption":"Average block 1, then locate its mean among Gaussian breakpoints.","panel":{"kind":"bars","title":"PAA values before symbolization","a":[0.3984728845633145],"a_label":"x features","b":[-0.04171452778326823],"b_label":"y features","labels":["block 1"],"marker":0},"input_highlight":[0,1,2,3]},{"phase":1,"caption":"Average block 2, then locate its mean among Gaussian breakpoints.","panel":{"kind":"bars","title":"PAA values before symbolization","a":[0.3984728845633145,-0.9758185199349719],"a_label":"x features","b":[-0.04171452778326823,-0.4773995957418473],"b_label":"y features","labels":["block 1","block 2"],"marker":1},"input_highlight":[4,5,6,7]},{"phase":1,"caption":"Average block 3, then locate its mean among Gaussian breakpoints.","panel":{"kind":"bars","title":"PAA values before symbolization","a":[0.3984728845633145,-0.9758185199349719,0.9758185199349725],"a_label":"x features","b":[-0.04171452778326823,-0.4773995957418473,0.4773995957418471],"b_label":"y features","labels":["block 1","block 2","block 3"],"marker":2},"input_highlight":[8,9,10,11]},{"phase":1,"caption":"Average block 4, then locate its mean among Gaussian breakpoints.","panel":{"kind":"bars","title":"PAA values before symbolization","a":[0.3984728845633145,-0.9758185199349719,0.9758185199349725,-0.3984728845633147],"a_label":"x features","b":[-0.04171452778326823,-0.4773995957418473,0.4773995957418471,0.041714527783268424],"b_label":"y features","labels":["block 1","block 2","block 3","block 4"],"marker":3},"input_highlight":[12,13,14,15]},{"phase":1,"caption":"Encode bins by a=0, b=1, c=2, d=3; their numeric codes are not distances.","panel":{"kind":"bars","title":"SAX symbol codes (not numeric distances)","a":[2.0],"a_label":"x symbols","b":[1.0],"b_label":"y symbols","labels":["1: c/b"],"marker":0}},{"phase":1,"caption":"Encode bins by a=0, b=1, c=2, d=3; their numeric codes are not distances.","panel":{"kind":"bars","title":"SAX symbol codes (not numeric distances)","a":[2.0,0.0],"a_label":"x symbols","b":[1.0,1.0],"b_label":"y symbols","labels":["1: c/b","2: a/b"],"marker":1}},{"phase":1,"caption":"Encode bins by a=0, b=1, c=2, d=3; their numeric codes are not distances.","panel":{"kind":"bars","title":"SAX symbol codes (not numeric distances)","a":[2.0,0.0,3.0],"a_label":"x symbols","b":[1.0,1.0,2.0],"b_label":"y symbols","labels":["1: c/b","2: a/b","3: d/c"],"marker":2}},{"phase":1,"caption":"Encode bins by a=0, b=1, c=2, d=3; their numeric codes are not distances.","panel":{"kind":"bars","title":"SAX symbol codes (not numeric distances)","a":[2.0,0.0,3.0,1.0],"a_label":"x symbols","b":[1.0,1.0,2.0,2.0],"b_label":"y symbols","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":3}},{"phase":2,"caption":"Use the gap between symbol intervals; equal or adjacent bins contribute zero.","panel":{"kind":"bars","title":"Squared interval-gap terms times n/w","a":[0.0],"a_label":"contributions","labels":["1: c/b"],"marker":0},"value":0.0,"value_label":"partial dissimilarity"},{"phase":2,"caption":"Use the gap between symbol intervals; equal or adjacent bins contribute zero.","panel":{"kind":"bars","title":"Squared interval-gap terms times n/w","a":[0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b"],"marker":1},"value":0.0,"value_label":"partial dissimilarity"},{"phase":2,"caption":"Use the gap between symbol intervals; equal or adjacent bins contribute zero.","panel":{"kind":"bars","title":"Squared interval-gap terms times n/w","a":[0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c"],"marker":2},"value":0.0,"value_label":"partial dissimilarity"},{"phase":2,"caption":"Use the gap between symbol intervals; equal or adjacent bins contribute zero.","panel":{"kind":"bars","title":"Squared interval-gap terms times n/w","a":[0.0,0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":3},"value":0.0,"value_label":"partial dissimilarity"},{"phase":3,"caption":"Here all symbols are adjacent: MINDIST is zero although the waveforms differ.","panel":{"kind":"bars","title":"Final SAX comparison contributions","a":[0.0,0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":0},"value":0.0,"value_label":"final dissimilarity"},{"phase":3,"caption":"Here all symbols are adjacent: MINDIST is zero although the waveforms differ.","panel":{"kind":"bars","title":"Final SAX comparison contributions","a":[0.0,0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":1},"value":0.0,"value_label":"final dissimilarity"},{"phase":3,"caption":"Here all symbols are adjacent: MINDIST is zero although the waveforms differ.","panel":{"kind":"bars","title":"Final SAX comparison contributions","a":[0.0,0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":2},"value":0.0,"value_label":"final dissimilarity"},{"phase":3,"caption":"Here all symbols are adjacent: MINDIST is zero although the waveforms differ.","panel":{"kind":"bars","title":"Final SAX comparison contributions","a":[0.0,0.0,0.0,0.0],"a_label":"contributions","labels":["1: c/b","2: a/b","3: d/c","4: b/c"],"marker":3},"value":0.0,"value_label":"final dissimilarity"}],"animation_steps_en":["Z-normalize each input and average four equal blocks.","Quantize block means with shared Gaussian quartile breakpoints.","Look up interval gaps; equal or adjacent symbols contribute zero.","Apply sqrt(n/w) to the gap norm to obtain a Euclidean lower bound."],"echotime_status":"Possible addition","echotime_api":""}
