{"id":"identity_embedding_similarity","title":"Identity-resample features embedding similarity","family":"embedding","definition":"reference","intro_en":"Linearly interpolate each series onto the same eight-point normalized-time grid and use the samples themselves as coordinates. This explicit identity-resample adapter aligns the representation length without learning a latent model or aligning local events. Cosine compares vector direction and is defined here for nonzero feature vectors.","intro_zh":"将每条序列线性插值到同一个八点归一化时间网格，直接把重采样值作为坐标。这个明确的恒等重采样适配器统一表示长度，无需学习潜在模型，也不进行局部事件对齐。 余弦比较向量方向，本例特征向量均非零。","steps_en":["Map each span to [0,1] and linearly interpolate at eight shared grid positions.","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":["把各自时间跨度映射到 [0,1]，在八个共享位置进行线性插值。","把计算得到的坐标按同一个固定顺序组成两个向量。","用两个向量的长度归一化坐标乘积之和，得到余弦相似度。","结合表示所舍弃的信息，在该表示空间中解释分数。"],"animation_steps_en":["Interpolate both inputs onto the same eight-point normalized-time grid.","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":["Normalizing time spans discards absolute duration unless it is retained separately.","Interpolation can miss or smooth brief events; it provides no invariance to arbitrary local timing changes.","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":["分别归一化时间跨度会舍弃绝对持续时间，除非另行保留。","插值可能遗漏或平滑短暂事件，也不提供任意局部时间变化下的不变性。","余弦忽略整个特征向量的正比例缩放；1-cosine 通常不满足度量公理，零向量还需明确处理规则。"],"sources":[{"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":"NumPy: one-dimensional linear interpolation","url":"https://numpy.org/doc/stable/reference/generated/numpy.interp.html"},{"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_points":8,"interpolation":"linear","grid":"independent normalized spans [0,1]","comparison":"cosine"},"result":{"label":"similarity","value":0.8409600760625723,"detail":"Computed from the explicitly defined illustrative encoder; no learned weights."},"frames":[{"phase":0,"caption":"Evaluate the first 2 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376],"b_label":"y resampled","x":[0.0,0.14285714285714285]}},{"phase":0,"caption":"Evaluate the first 3 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478,0.11411208005170653],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077],"b_label":"y resampled","x":[0.0,0.14285714285714285,0.2857142857142857]}},{"phase":0,"caption":"Evaluate the first 4 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757],"b_label":"y resampled","x":[0.0,0.14285714285714285,0.2857142857142857,0.42857142857142855]}},{"phase":0,"caption":"Evaluate the first 5 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096],"b_label":"y resampled","x":[0.0,0.14285714285714285,0.2857142857142857,0.42857142857142855,0.5714285714285714]}},{"phase":0,"caption":"Evaluate the first 6 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341,1.1657719641202489],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096,1.1608085959685452],"b_label":"y resampled","x":[0.0,0.14285714285714285,0.2857142857142857,0.42857142857142855,0.5714285714285714,0.7142857142857142]}},{"phase":0,"caption":"Evaluate the first 8 positions of the eight-point normalized-time grid.","panel":{"kind":"lines","title":"Samples interpolated on the shared time grid","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341,1.1657719641202489,0.2606824163697291,0.11360389693210537],"a_label":"x resampled","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096,1.1608085959685452,0.7014757265557027,-0.07500000000000043],"b_label":"y resampled","x":[0.0,0.14285714285714285,0.2857142857142857,0.42857142857142855,0.5714285714285714,0.7142857142857142,0.8571428571428571,1.0]}},{"phase":1,"caption":"Expose 1 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0],"a_label":"x features","b":[-0.2003300858899106],"b_label":"y features","labels":["grid 1"],"marker":0}},{"phase":1,"caption":"Expose 2 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.8061775100103478],"a_label":"x features","b":[-0.2003300858899106,0.6324257879056376],"b_label":"y features","labels":["grid 1","grid 2"],"marker":1}},{"phase":1,"caption":"Expose 3 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.8061775100103478,0.11411208005170653],"a_label":"x features","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077],"b_label":"y features","labels":["grid 1","grid 2","grid 3"],"marker":2}},{"phase":1,"caption":"Expose 5 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341],"a_label":"x features","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096],"b_label":"y features","labels":["grid 1","grid 2","grid 3","grid 4","grid 5"],"marker":4}},{"phase":1,"caption":"Expose 6 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341,1.1657719641202489],"a_label":"x features","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096,1.1608085959685452],"b_label":"y features","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6"],"marker":5}},{"phase":1,"caption":"Expose 8 of 8 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.8061775100103478,0.11411208005170653,-0.3839445061008502,0.7105725208248341,1.1657719641202489,0.2606824163697291,0.11360389693210537],"a_label":"x features","b":[-0.2003300858899106,0.6324257879056376,0.8073786327785077,-0.35233147765137757,0.2998585346186096,1.1608085959685452,0.7014757265557027,-0.07500000000000043],"b_label":"y features","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":7}},{"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.0],"a_label":"contributions","labels":["grid 1"],"marker":0},"value":0.0,"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.0,0.1730337222648399],"a_label":"contributions","labels":["grid 1","grid 2"],"marker":1},"value":0.1730337222648399,"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.0,0.1730337222648399,0.03126794755669827],"a_label":"contributions","labels":["grid 1","grid 2","grid 3"],"marker":2},"value":0.20430166982153816,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5"],"marker":4},"value":0.3225248230786629,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6"],"marker":5},"value":0.7817912759603038,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086,0.062060445230702095,-0.0028916451284336704],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":7},"value":0.8409600760625723,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086,0.062060445230702095,-0.0028916451284336704],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":0},"value":0.8409600760625723,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086,0.062060445230702095,-0.0028916451284336704],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":2},"value":0.8409600760625723,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086,0.062060445230702095,-0.0028916451284336704],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":5},"value":0.8409600760625723,"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.0,0.1730337222648399,0.03126794755669827,0.04591032891946711,0.07231282433765766,0.45926645288164086,0.062060445230702095,-0.0028916451284336704],"a_label":"contributions","labels":["grid 1","grid 2","grid 3","grid 4","grid 5","grid 6","grid 7","grid 8"],"marker":7},"value":0.8409600760625723,"value_label":"final similarity"}],"echotime_status":"Low-priority addition","echotime_api":""}
