{"id":"lorentzian","title":"Lorentzian-style log distance","family":"lock-step","definition":"reference","intro_en":"This Lorentzian-style entry applies a logarithm to each absolute residual before summing. The transformation compresses large residuals relative to a linear or squared penalty. Its animation compares raw residuals with the log-transformed contributions. The added constant one fixes an implicit amplitude scale, which must be meaningful for the data units.","intro_zh":"此 Lorentzian 型条目先对每个绝对残差进行 log(1+误差) 变换，再累加。相较线性或平方惩罚，对数会压缩大误差。加数 1 隐含了幅值尺度，因此使用时必须考虑数据单位。","steps_en":["Keep the two series on the same sample grid; no shift or warping is estimated.","Apply log(1+absolute residual); the highlighted point supplies one coordinate contribution.","Accumulate the coordinate contributions in sample order.","Sum the log-compressed discrepancies."],"steps_zh":["在同一采样网格上比较两条序列，不估计平移或时间规整。","逐坐标计算 log(1+绝对残差)。","按采样顺序累积局部贡献。","直接累加对数压缩后的局部贡献。"],"formula":"sum_i log(1+abs(x_i-y_i))","caveats_en":["Changing measurement units changes the balance introduced by the constant one.","Sample alignment and amplitude units are part of the comparison protocol."],"caveats_zh":["改变测量单位会改变常数 1 所引入的尺度关系。","采样对齐和幅值单位属于比较协议的一部分。"],"sources":[{"label":"Imported registry: explicit formula convention","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/data/ts_similarity_package_v2_registry.csv"}],"x":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1,2.8,3.8,4.1,3.3],"y":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6,2.6,3.1,4.4,3.9],"input_label":"Deterministic synthetic illustration; sample index is the time axis.","parameters":{"samples":12,"preprocessing":"none","domain":"strictly positive illustration"},"result":{"label":"distance","value":4.380444828117273,"detail":"Exact formula evaluation on the displayed aligned vectors."},"frames":[{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5],"a_label":"x","b":[1.3,1.8],"b_label":"y","marker":1}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2],"b_label":"y","marker":4}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6],"b_label":"y","marker":7}},{"phase":0,"caption":"Aligned samples","panel":{"kind":"lines","title":"Aligned samples","a":[1.0,1.5,2.4,3.7,4.5,3.8,2.6,2.1,2.8,3.8,4.1,3.3],"a_label":"x","b":[1.3,1.8,2.0,3.2,5.2,4.4,2.9,1.6,2.6,3.1,4.4,3.9],"b_label":"y","marker":11}},{"phase":1,"caption":"Compute coordinate 1: Apply log(1+absolute residual)","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":0},"value":0.26236426446749106,"value_label":"coordinate term","input_highlight":[0]},{"phase":1,"caption":"Compute coordinate 4: Apply log(1+absolute residual)","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.4054651081081644,"value_label":"coordinate term","input_highlight":[3]},{"phase":1,"caption":"Compute coordinate 8: Apply log(1+absolute residual)","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.4054651081081644,"value_label":"coordinate term","input_highlight":[7]},{"phase":1,"caption":"Compute coordinate 12: Apply log(1+absolute residual)","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":11},"value":0.47000362924573563,"value_label":"coordinate term","input_highlight":[11]},{"phase":2,"caption":"Accumulate 1 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":0},"value":0.26236426446749106,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 2 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":1},"value":0.5247285289349821,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 4 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":1.2666658736643595,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 5 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":4},"value":1.79729412472653,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 7 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":6},"value":2.529662018439757,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 8 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":2.935127126547921,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 10 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.0,0.0],"a_label":"contribution","marker":9},"value":3.648076934404046,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 12 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":11},"value":4.380444828117273,"value_label":"running sum"},{"phase":3,"caption":"Sum the log-compressed discrepancies","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":0},"value":4.380444828117273,"value_label":"final result"},{"phase":3,"caption":"Sum the log-compressed discrepancies","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":3},"value":4.380444828117273,"value_label":"final result"},{"phase":3,"caption":"Sum the log-compressed discrepancies","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":7},"value":4.380444828117273,"value_label":"final result"},{"phase":3,"caption":"Sum the log-compressed discrepancies","panel":{"kind":"bars","title":"Apply log(1+absolute residual)","a":[0.26236426446749106,0.26236426446749106,0.3364722366212129,0.4054651081081644,0.5306282510621705,0.4700036292457359,0.2623642644674909,0.4054651081081644,0.1823215567939544,0.5306282510621703,0.2623642644674916,0.47000362924573563],"a_label":"contribution","marker":11},"value":4.380444828117273,"value_label":"final result"}],"animation_steps_en":["Keep samples on the same time grid.","Apply log(1+absolute residual).","Accumulate the coordinate contributions.","Sum the log-compressed discrepancies."],"echotime_status":"Low-priority addition","echotime_api":""}
