{"id":"paa_distance","title":"PAA block means distance","family":"feature-based","definition":"reference","intro_en":"Split the 16 observations into four equal, consecutive blocks and replace each block by its mean. Comparing these ordered block averages emphasizes coarse temporal structure. The animation highlights the exact observations contributing to each coordinate. Euclidean distance retains differences in both vector scale and coordinates.","intro_zh":"把 16 个观测分成四个连续等长区间，每个区间用均值表示。比较这些有序均值可突出较粗的时间结构；动图逐块高亮每个坐标所使用的观测。 欧氏距离同时保留向量尺度与坐标差异。","steps_en":["Average each consecutive block of four observations to obtain four coordinates.","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":["每四个连续观测求一次均值，得到四个坐标。","把计算得到的坐标按同一个固定顺序组成两个向量。","对坐标差计算欧氏范数。","结合表示所舍弃的信息，在该表示空间中解释分数。"],"animation_steps_en":["Replace each four-sample block by its mean.","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":["The displayed Euclidean feature distance is unscaled; the usual length-scaled PAA lower bound additionally multiplies it by sqrt(n/w).","Short events within a block can cancel, and moving a block boundary can alter the representation.","A metric on these feature vectors can be only a pseudometric on the original series when the representation loses information."],"caveats_zh":["图中欧氏特征距离未经长度缩放；常用 PAA 下界还需乘以 sqrt(n/w)。","区间内的短暂事件可能互相抵消，改变分段边界也会改变表示。","当表示损失信息时，特征空间中的度量在原序列空间上可能只是伪度量。"],"sources":[{"label":"tslearn: piecewise aggregate approximation","url":"https://tslearn.readthedocs.io/en/stable/gen_modules/piecewise/tslearn.piecewise.PiecewiseAggregateApproximation.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":{"n_segments":4,"block_size":4,"z_normalization":false,"distance_length_scaling":false,"comparison":"euclidean"},"result":{"label":"distance","value":0.6126940792205804,"detail":"Computed from the explicitly defined illustrative encoder; no learned weights."},"frames":[{"phase":0,"caption":"Average the four samples inside block 1.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465],"a_label":"x features","b":[0.39],"b_label":"y features","labels":["block 1"],"marker":0},"input_highlight":[0,1,2,3]},{"phase":0,"caption":"Average the four samples inside block 2.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465,-0.22056665432580225],"a_label":"x features","b":[0.39,0.15500000000000003],"b_label":"y features","labels":["block 1","block 2"],"marker":1},"input_highlight":[4,5,6,7]},{"phase":0,"caption":"Average the four samples inside block 3.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465,-0.22056665432580225,0.9705666543258025],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998],"b_label":"y features","labels":["block 1","block 2","block 3"],"marker":2},"input_highlight":[8,9,10,11]},{"phase":0,"caption":"Average the four samples inside block 4.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465,-0.22056665432580225,0.9705666543258025,0.1318019484660532],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998,0.4350000000000001],"b_label":"y features","labels":["block 1","block 2","block 3","block 4"],"marker":3},"input_highlight":[12,13,14,15]},{"phase":0,"caption":"Average the four samples inside block 3.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465,-0.22056665432580225,0.9705666543258025],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998],"b_label":"y features","labels":["block 1","block 2","block 3"],"marker":2},"input_highlight":[8,9,10,11]},{"phase":0,"caption":"Average the four samples inside block 4.","panel":{"kind":"bars","title":"PAA: one mean per consecutive block","a":[0.6181980515339465,-0.22056665432580225,0.9705666543258025,0.1318019484660532],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998,0.4350000000000001],"b_label":"y features","labels":["block 1","block 2","block 3","block 4"],"marker":3},"input_highlight":[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.6181980515339465],"a_label":"x features","b":[0.39],"b_label":"y features","labels":["block 1"],"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.6181980515339465],"a_label":"x features","b":[0.39],"b_label":"y features","labels":["block 1"],"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.6181980515339465,-0.22056665432580225],"a_label":"x features","b":[0.39,0.15500000000000003],"b_label":"y features","labels":["block 1","block 2"],"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.6181980515339465,-0.22056665432580225],"a_label":"x features","b":[0.39,0.15500000000000003],"b_label":"y features","labels":["block 1","block 2"],"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.6181980515339465,-0.22056665432580225,0.9705666543258025],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998],"b_label":"y features","labels":["block 1","block 2","block 3"],"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.6181980515339465,-0.22056665432580225,0.9705666543258025,0.1318019484660532],"a_label":"x features","b":[0.39,0.15500000000000003,0.6699999999999998,0.4350000000000001],"b_label":"y features","labels":["block 1","block 2","block 3","block 4"],"marker":3}},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968],"a_label":"contributions","labels":["block 1"],"marker":0},"value":0.22819805153394646,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968],"a_label":"contributions","labels":["block 1"],"marker":0},"value":0.22819805153394646,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665],"a_label":"contributions","labels":["block 1","block 2"],"marker":1},"value":0.43945951186129345,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665],"a_label":"contributions","labels":["block 1","block 2"],"marker":1},"value":0.43945951186129345,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655],"a_label":"contributions","labels":["block 1","block 2","block 3"],"marker":2},"value":0.5324142900580082,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655,0.09192905845398193],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":3},"value":0.6126940792205804,"value_label":"partial distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655,0.09192905845398193],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":0},"value":0.6126940792205804,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655,0.09192905845398193],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":1},"value":0.6126940792205804,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655,0.09192905845398193],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":2},"value":0.6126940792205804,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.05207435072388968,0.14105031184147665,0.09034031369260655,0.09192905845398193],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":3},"value":0.6126940792205804,"value_label":"final distance"}],"echotime_status":"Possible addition","echotime_api":""}
