{"id":"stats_embedding_similarity","title":"Basic statistics embedding similarity","family":"embedding","definition":"reference","intro_en":"Represent each series by its mean, population standard deviation, minimum and maximum. These four coordinates summarize level, spread and range; their order in the vector is fixed, while the original temporal order is discarded. Cosine compares vector direction and is defined here for nonzero feature vectors.","intro_zh":"把每条序列表示为均值、总体标准差、最小值和最大值四个坐标。它们概括水平、波动和范围，坐标顺序固定，但原始时间顺序被舍弃。 余弦比较向量方向，本例特征向量均非零。","steps_en":["Compute mean, population SD, minimum and maximum in that order.","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":["Compute mean, population SD, minimum and maximum.","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":["Permuting observations leaves this vector unchanged, even when temporal behavior changes completely.","Features have different scales; this example uses no coordinate weighting. A production scaler must be fitted without test-data leakage.","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":"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":["mean","std_ddof0","min","max"],"coordinate_scaling":"none","comparison":"cosine"},"result":{"label":"similarity","value":0.9930615716082597,"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.6181980515339465,0.35846338142804945,0.0,0.8769216919004693],"a_label":"x features","b":[0.39,0.44756523272698795,-0.2003300858899106,1.005],"b_label":"y features","labels":["mean","SD","min","max"]},"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.3810660171779822,0.5254744402936877,-0.5769216919004693,0.8769216919004693],"a_label":"x features","b":[0.4808883476483185,0.4336708070831276,-0.2003300858899106,1.005],"b_label":"y features","labels":["mean","SD","min","max"]},"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.1988156986040721,0.5679984463565316,-0.6000000000000001,0.8769216919004693],"a_label":"x features","b":[0.27249999999999996,0.5208946630557852,-0.3550000000000001,1.005],"b_label":"y features","labels":["mean","SD","min","max"]},"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.2886396103067893,0.5734289068326921,-0.6000000000000001,1.0863961030678926],"a_label":"x features","b":[0.2724669914110089,0.4738026679039113,-0.3550000000000001,1.005],"b_label":"y features","labels":["mean","SD","min","max"]},"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.45606601717798223,0.6549116062399434,-0.6000000000000001,1.5905255888325764],"a_label":"x features","b":[0.40499999999999986,0.5317626781268636,-0.3550000000000001,1.2849999999999995],"b_label":"y features","labels":["mean","SD","min","max"]},"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.3749999999999999,0.6103252215027548,-0.6000000000000001,1.5905255888325764],"a_label":"x features","b":[0.4125,0.5393804316064869,-0.3550000000000001,1.2849999999999995],"b_label":"y features","labels":["mean","SD","min","max"]},"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.3749999999999999],"a_label":"x features","b":[0.4125],"b_label":"y features","labels":["mean"],"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.3749999999999999],"a_label":"x features","b":[0.4125],"b_label":"y features","labels":["mean"],"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.3749999999999999,0.6103252215027548],"a_label":"x features","b":[0.4125,0.5393804316064869],"b_label":"y features","labels":["mean","SD"],"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.3749999999999999,0.6103252215027548],"a_label":"x features","b":[0.4125,0.5393804316064869],"b_label":"y features","labels":["mean","SD"],"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.3749999999999999,0.6103252215027548,-0.6000000000000001],"a_label":"x features","b":[0.4125,0.5393804316064869,-0.3550000000000001],"b_label":"y features","labels":["mean","SD","min"],"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.3749999999999999,0.6103252215027548,-0.6000000000000001,1.5905255888325764],"a_label":"x features","b":[0.4125,0.5393804316064869,-0.3550000000000001,1.2849999999999995],"b_label":"y features","labels":["mean","SD","min","max"],"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.05604904988483359],"a_label":"contributions","labels":["mean"],"marker":0},"value":0.05604904988483359,"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.05604904988483359],"a_label":"contributions","labels":["mean"],"marker":0},"value":0.05604904988483359,"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.05604904988483359,0.11928052400252655],"a_label":"contributions","labels":["mean","SD"],"marker":1},"value":0.17532957388736015,"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.05604904988483359,0.11928052400252655],"a_label":"contributions","labels":["mean","SD"],"marker":1},"value":0.17532957388736015,"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.05604904988483359,0.11928052400252655,0.07717784323535878],"a_label":"contributions","labels":["mean","SD","min"],"marker":2},"value":0.25250741712271896,"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.05604904988483359,0.11928052400252655,0.07717784323535878,0.7405541544855407],"a_label":"contributions","labels":["mean","SD","min","max"],"marker":3},"value":0.9930615716082597,"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.05604904988483359,0.11928052400252655,0.07717784323535878,0.7405541544855407],"a_label":"contributions","labels":["mean","SD","min","max"],"marker":0},"value":0.9930615716082597,"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.05604904988483359,0.11928052400252655,0.07717784323535878,0.7405541544855407],"a_label":"contributions","labels":["mean","SD","min","max"],"marker":1},"value":0.9930615716082597,"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.05604904988483359,0.11928052400252655,0.07717784323535878,0.7405541544855407],"a_label":"contributions","labels":["mean","SD","min","max"],"marker":2},"value":0.9930615716082597,"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.05604904988483359,0.11928052400252655,0.07717784323535878,0.7405541544855407],"a_label":"contributions","labels":["mean","SD","min","max"],"marker":3},"value":0.9930615716082597,"value_label":"final similarity"}],"echotime_status":"Low-priority addition","echotime_api":""}
