{"id":"robust_stats_embedding_distance","title":"Robust statistics embedding distance","family":"embedding","definition":"reference","intro_en":"Replace extrema and moments with the lower quartile, median, upper quartile and median absolute deviation. This explicit descriptor emphasizes the central distribution and reduces the influence of isolated extreme values. It does not preserve the timing of those values. Euclidean distance retains differences in both vector scale and coordinates.","intro_zh":"使用下四分位数、中位数、上四分位数和中位绝对偏差构成明确的描述向量。它强调分布的中心部分，降低孤立极端值的影响，同时舍弃这些数值出现的时刻。 欧氏距离同时保留向量尺度与坐标差异。","steps_en":["Calculate Q25, median, Q75 and unscaled median absolute deviation.","Collect the computed coordinates in the same fixed order for both inputs.","Take the Euclidean norm of the coordinate differences.","Interpret the score in this representation, accounting for the information it discards."],"steps_zh":["计算 Q25、中位数、Q75 和未经常数缩放的中位绝对偏差。","把计算得到的坐标按同一个固定顺序组成两个向量。","对坐标差计算欧氏范数。","结合表示所舍弃的信息，在该表示空间中解释分数。"],"animation_steps_en":["Compute quartiles, median and unscaled median absolute deviation.","Collect matching coordinates in the same vector order.","Take the Euclidean norm of coordinate differences.","Read the score in this feature space, with its stated information loss."],"formula":"d(x,y) = sqrt(sum_j (phi_j(x)-phi_j(y))^2)","caveats_en":["Robustness concerns these particular statistics, not immunity to arbitrary contamination or distribution shift.","Quantiles use linear interpolation and MAD is unscaled; alternative conventions produce different vectors.","A metric on these feature vectors can be only a pseudometric on the original series when the representation loses information."],"caveats_zh":["稳健性针对所选统计量，并不表示可抵抗任意污染或分布变化。","本例分位数采用线性插值，MAD 不乘缩放常数；其他约定会产生不同向量。","当表示损失信息时，特征空间中的度量在原序列空间上可能只是伪度量。"],"sources":[{"label":"NumPy: summary-statistic definitions","url":"https://numpy.org/doc/stable/reference/routines.statistics.html"},{"label":"Imported registry: named feature and comparison conventions","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/data/ts_similarity_package_v2_registry.csv"},{"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],"input_label":"Deterministic synthetic teaching signals, 16 samples each","parameters":{"features":["q25","median","q75","unscaled_MAD"],"quantile_method":"linear","comparison":"euclidean"},"result":{"label":"distance","value":0.12641944001962566,"detail":"Computed from the explicitly defined illustrative encoder; no learned weights."},"frames":[{"phase":0,"caption":"Summarize the first 4 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 4 samples","a":[0.5897970773009197,0.7979352571176582,0.826336231350685,0.04526279441628822],"a_label":"x features","b":[0.08866747852752235,0.3776650429449553,0.678997564417433,0.38533008588991063],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3]},{"phase":0,"caption":"Summarize the first 6 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 6 samples","a":[0.09763139720814418,0.5884608459502347,0.8037048341425409,0.2547372055837117],"a_label":"x features","b":[0.22000000000000003,0.4476650429449554,0.8928300858899106,0.40766504294495537],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3,4,5]},{"phase":0,"caption":"Summarize the first 8 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 8 samples","a":[-0.21613330865160452,0.19526279441628835,0.7921656800927755,0.6026724627013699],"a_label":"x features","b":[-0.23783008588991061,0.2550000000000001,0.6778300858899107,0.5303300858899107],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3,4,5,6,7]},{"phase":0,"caption":"Summarize the first 10 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 10 samples","a":[-0.07190288567648721,0.3000000000000001,0.8037048341425409,0.49793525711765807],"a_label":"x features","b":[-0.13033008588991063,0.2550000000000001,0.543997564417433,0.38533008588991063],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3,4,5,6,7,8,9]},{"phase":0,"caption":"Summarize the first 12 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 12 samples","a":[-0.02396762855882907,0.5884608459502347,0.9066588974841813,0.4526724627013702],"a_label":"x features","b":[0.009669914110089328,0.3950000000000001,0.8878300858899106,0.5253300858899106],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3,4,5,6,7,8,9,10,11]},{"phase":0,"caption":"Summarize the first 16 observations using the stated descriptor.","panel":{"kind":"bars","title":"Descriptor from first 16 samples","a":[-0.02396762855882907,0.3000000000000001,0.826336231350685,0.49793525711765807],"a_label":"x features","b":[-0.07149756441743323,0.3950000000000001,0.8878300858899106,0.4676650429449557],"b_label":"y features","labels":["Q25","median","Q75","MAD"]},"input_highlight":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},{"phase":1,"caption":"Expose 1 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907],"a_label":"x features","b":[-0.07149756441743323],"b_label":"y features","labels":["Q25"],"marker":0}},{"phase":1,"caption":"Expose 1 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907],"a_label":"x features","b":[-0.07149756441743323],"b_label":"y features","labels":["Q25"],"marker":0}},{"phase":1,"caption":"Expose 2 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907,0.3000000000000001],"a_label":"x features","b":[-0.07149756441743323,0.3950000000000001],"b_label":"y features","labels":["Q25","median"],"marker":1}},{"phase":1,"caption":"Expose 2 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907,0.3000000000000001],"a_label":"x features","b":[-0.07149756441743323,0.3950000000000001],"b_label":"y features","labels":["Q25","median"],"marker":1}},{"phase":1,"caption":"Expose 3 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907,0.3000000000000001,0.826336231350685],"a_label":"x features","b":[-0.07149756441743323,0.3950000000000001,0.8878300858899106],"b_label":"y features","labels":["Q25","median","Q75"],"marker":2}},{"phase":1,"caption":"Expose 4 of 4 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[-0.02396762855882907,0.3000000000000001,0.826336231350685,0.49793525711765807],"a_label":"x features","b":[-0.07149756441743323,0.3950000000000001,0.8878300858899106,0.4676650429449557],"b_label":"y features","labels":["Q25","median","Q75","MAD"],"marker":3}},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253],"a_label":"contributions","labels":["Q25"],"marker":0},"value":0.047529935858604155,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253],"a_label":"contributions","labels":["Q25"],"marker":0},"value":0.047529935858604155,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995],"a_label":"contributions","labels":["Q25","median"],"marker":1},"value":0.1062266200287057,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995],"a_label":"contributions","labels":["Q25","median"],"marker":1},"value":0.1062266200287057,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396],"a_label":"contributions","labels":["Q25","median","Q75"],"marker":2},"value":0.12274196083171582,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396,0.0009162858660612714],"a_label":"contributions","labels":["Q25","median","Q75","MAD"],"marker":3},"value":0.12641944001962566,"value_label":"partial distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396,0.0009162858660612714],"a_label":"contributions","labels":["Q25","median","Q75","MAD"],"marker":0},"value":0.12641944001962566,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396,0.0009162858660612714],"a_label":"contributions","labels":["Q25","median","Q75","MAD"],"marker":1},"value":0.12641944001962566,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396,0.0009162858660612714],"a_label":"contributions","labels":["Q25","median","Q75","MAD"],"marker":2},"value":0.12641944001962566,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0022590948027230253,0.009024999999999995,0.0037814941460914396,0.0009162858660612714],"a_label":"contributions","labels":["Q25","median","Q75","MAD"],"marker":3},"value":0.12641944001962566,"value_label":"final distance"}],"echotime_status":"Low-priority addition","echotime_api":""}
