{"id":"paa_embedding_similarity","title":"PAA block means embedding similarity","family":"embedding","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. Cosine compares vector direction and is defined here for nonzero feature vectors.","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.","Normalize by both vector lengths and sum coordinate products to obtain cosine similarity.","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.","Normalize vector products to obtain cosine similarity.","Read the score in this feature space, with its stated information loss."],"formula":"s(x,y) = dot(phi(x),phi(y)) / (norm(phi(x))*norm(phi(y)))","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.","Cosine ignores positive rescaling of the entire feature vector; 1-cosine is generally not a metric, and zero vectors require an explicit policy."],"caveats_zh":["图中欧氏特征距离未经长度缩放；常用 PAA 下界还需乘以 sqrt(n/w)。","区间内的短暂事件可能互相抵消，改变分段边界也会改变表示。","余弦忽略整个特征向量的正比例缩放；1-cosine 通常不满足度量公理，零向量还需明确处理规则。"],"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":"cosine"},"result":{"label":"similarity","value":0.8595648532871657,"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":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084],"a_label":"contributions","labels":["block 1"],"marker":0},"value":0.22660855238418084,"value_label":"partial dot sum"},{"phase":2,"caption":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084],"a_label":"contributions","labels":["block 1"],"marker":0},"value":0.22660855238418084,"value_label":"partial dot sum"},{"phase":2,"caption":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444],"a_label":"contributions","labels":["block 1","block 2"],"marker":1},"value":0.19447523147102141,"value_label":"partial dot sum"},{"phase":2,"caption":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444],"a_label":"contributions","labels":["block 1","block 2"],"marker":1},"value":0.19447523147102141,"value_label":"partial dot sum"},{"phase":2,"caption":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306],"a_label":"contributions","labels":["block 1","block 2","block 3"],"marker":2},"value":0.805676471163652,"value_label":"partial dot sum"},{"phase":2,"caption":"Sum normalized dot-product contributions from the displayed coordinates.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306,0.05388838212351365],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":3},"value":0.8595648532871657,"value_label":"partial dot sum"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306,0.05388838212351365],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":0},"value":0.8595648532871657,"value_label":"final similarity"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306,0.05388838212351365],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":1},"value":0.8595648532871657,"value_label":"final similarity"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306,0.05388838212351365],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":2},"value":0.8595648532871657,"value_label":"final similarity"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Dot-product terms / fixed full-vector norms","a":[0.22660855238418084,-0.032133320913159444,0.6112012396926306,0.05388838212351365],"a_label":"contributions","labels":["block 1","block 2","block 3","block 4"],"marker":3},"value":0.8595648532871657,"value_label":"final similarity"}],"echotime_status":"Low-priority addition","echotime_api":""}
