{"id":"histogram_embedding_distance","title":"Value histograms embedding distance","family":"embedding","definition":"reference","intro_en":"Count observations in seven shared, fixed value intervals and divide by the sample count. The two probability vectors describe how often values occur. Shared edges make the coordinates comparable; all temporal ordering is intentionally removed. Euclidean distance retains differences in both vector scale and coordinates.","intro_zh":"在七个共享、固定的数值区间中计数，再除以样本数。两个概率向量描述数值出现的频率。共享边界保证坐标可比较，同时有意舍弃全部时间顺序。 欧氏距离同时保留向量尺度与坐标差异。","steps_en":["Use identical bin edges for both inputs and normalize counts into bin probabilities.","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":["Count values in shared bins and divide by the sample count.","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":["Separate automatic binning can make coordinate-wise comparison invalid; the edges must be shared.","Values within one bin are indistinguishable, and permuted sequences have identical histograms.","A metric on these feature vectors can be only a pseudometric on the original series when the representation loses information."],"caveats_zh":["分别自动分箱可能导致坐标不可比，因此必须共享边界。","同一区间内的数值无法区分，重排序列也具有相同直方图。","当表示损失信息时，特征空间中的度量在原序列空间上可能只是伪度量。"],"sources":[{"label":"NumPy: histogram bins and normalization","url":"https://numpy.org/doc/stable/reference/generated/numpy.histogram.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":{"edges":[-1.5,-1.0,-0.5,0.0,0.5,1.0,1.5,2.0],"normalization":"probability mass, not density","comparison":"euclidean"},"result":{"label":"distance","value":0.33071891388307384,"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.0,0.0,0.0,0.25,0.75,0.0,0.0],"a_label":"x features","b":[0.0,0.0,0.25,0.25,0.25,0.25,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"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.0,0.16666666666666666,0.0,0.3333333333333333,0.5,0.0,0.0],"a_label":"x features","b":[0.0,0.0,0.16666666666666666,0.3333333333333333,0.16666666666666666,0.3333333333333333,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"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.0,0.25,0.125,0.25,0.375,0.0,0.0],"a_label":"x features","b":[0.0,0.0,0.375,0.25,0.125,0.25,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"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.0,0.2,0.1,0.3,0.3,0.1,0.0],"a_label":"x features","b":[0.0,0.0,0.3,0.4,0.1,0.2,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"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.0,0.16666666666666666,0.08333333333333333,0.25,0.3333333333333333,0.08333333333333333,0.08333333333333333],"a_label":"x features","b":[0.0,0.0,0.25,0.3333333333333333,0.16666666666666666,0.25,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"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.0,0.125,0.125,0.3125,0.3125,0.0625,0.0625],"a_label":"x features","b":[0.0,0.0,0.3125,0.25,0.1875,0.25,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"]},"input_highlight":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},{"phase":1,"caption":"Expose 1 of 7 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.0],"b_label":"y features","labels":["bin 1"],"marker":0}},{"phase":1,"caption":"Expose 2 of 7 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.125],"a_label":"x features","b":[0.0,0.0],"b_label":"y features","labels":["bin 1","bin 2"],"marker":1}},{"phase":1,"caption":"Expose 3 of 7 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.125,0.125],"a_label":"x features","b":[0.0,0.0,0.3125],"b_label":"y features","labels":["bin 1","bin 2","bin 3"],"marker":2}},{"phase":1,"caption":"Expose 4 of 7 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.125,0.125,0.3125],"a_label":"x features","b":[0.0,0.0,0.3125,0.25],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4"],"marker":3}},{"phase":1,"caption":"Expose 5 of 7 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.125,0.125,0.3125,0.3125],"a_label":"x features","b":[0.0,0.0,0.3125,0.25,0.1875],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5"],"marker":4}},{"phase":1,"caption":"Expose 7 of 7 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[0.0,0.125,0.125,0.3125,0.3125,0.0625,0.0625],"a_label":"x features","b":[0.0,0.0,0.3125,0.25,0.1875,0.25,0.0],"b_label":"y features","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":6}},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0],"a_label":"contributions","labels":["bin 1"],"marker":0},"value":0.0,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625],"a_label":"contributions","labels":["bin 1","bin 2"],"marker":1},"value":0.125,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3"],"marker":2},"value":0.22534695471649932,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4"],"marker":3},"value":0.23385358667337133,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5"],"marker":4},"value":0.2651650429449553,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":6},"value":0.33071891388307384,"value_label":"partial distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":0},"value":0.33071891388307384,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":2},"value":0.33071891388307384,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":4},"value":0.33071891388307384,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[0.0,0.015625,0.03515625,0.00390625,0.015625,0.03515625,0.00390625],"a_label":"contributions","labels":["bin 1","bin 2","bin 3","bin 4","bin 5","bin 6","bin 7"],"marker":6},"value":0.33071891388307384,"value_label":"final distance"}],"echotime_status":"Low-priority addition","echotime_api":""}
