{"id":"minkowski","title":"Minkowski distance (p=3)","family":"lock-step","definition":"reference","intro_en":"Minkowski distance controls how strongly larger coordinate errors dominate through an exponent p. This illustration fixes p to three: absolute residuals are cubed, added, and then transformed by a cube root. Choosing another p changes the definition; p equals one and two recover Manhattan and Euclidean distances.","intro_zh":"Minkowski 距离用指数 p 控制大误差的影响。本例固定 p=3：绝对残差立方后相加，再开立方。p 的选择属于方法定义；p=1 与 p=2 分别对应曼哈顿和欧氏距离。","steps_en":["Keep the two series on the same sample grid; no shift or warping is estimated.","Cube the absolute residual (p=3); the highlighted point supplies one coordinate contribution.","Accumulate the coordinate contributions in sample order.","Take the p-th root of the accumulated p-th powers."],"steps_zh":["在同一采样网格上比较两条序列，不估计平移或时间规整。","对各坐标绝对残差取三次方，本例 p=3。","按采样顺序累积局部贡献。","对三次方总和开立方。"],"formula":"(sum_i abs(x_i-y_i)^p)^(1/p); p=3","caveats_en":["The norm/metric property requires p >= 1; p < 1 defines a different quasi-distance.","Sample alignment and amplitude units are part of the comparison protocol."],"caveats_zh":["范数和度量性质要求 p≥1；p<1 时属于不同的拟距离。","采样对齐和幅值单位属于比较协议的一部分。"],"sources":[{"label":"SciPy: minkowski","url":"https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.minkowski.html"}],"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","p":3},"result":{"label":"distance","value":1.1567965519315508,"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: Cube the absolute residual (p=3)","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,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.027000000000000014,"value_label":"coordinate term","input_highlight":[0]},{"phase":1,"caption":"Compute coordinate 4: Cube the absolute residual (p=3)","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.125,"value_label":"coordinate term","input_highlight":[3]},{"phase":1,"caption":"Compute coordinate 8: Cube the absolute residual (p=3)","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.125,"value_label":"coordinate term","input_highlight":[7]},{"phase":1,"caption":"Compute coordinate 12: Cube the absolute residual (p=3)","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":11},"value":0.2160000000000001,"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.027000000000000014,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.027000000000000014,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 2 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,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.05400000000000003,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 4 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":3},"value":0.243,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 5 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":4},"value":0.5860000000000003,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 7 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.0,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":6},"value":0.8290000000000008,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 8 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.0,0.0,0.0,0.0],"a_label":"contribution","marker":7},"value":0.9540000000000007,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 10 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.0,0.0],"a_label":"contribution","marker":9},"value":1.3050000000000004,"value_label":"running sum"},{"phase":2,"caption":"Accumulate 12 of 12 coordinate terms","panel":{"kind":"bars","title":"Terms included so far","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":11},"value":1.5480000000000007,"value_label":"running sum"},{"phase":3,"caption":"Take the p-th root of the accumulated p-th powers","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":0},"value":1.1567965519315508,"value_label":"final result"},{"phase":3,"caption":"Take the p-th root of the accumulated p-th powers","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":3},"value":1.1567965519315508,"value_label":"final result"},{"phase":3,"caption":"Take the p-th root of the accumulated p-th powers","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":7},"value":1.1567965519315508,"value_label":"final result"},{"phase":3,"caption":"Take the p-th root of the accumulated p-th powers","panel":{"kind":"bars","title":"Cube the absolute residual (p=3)","a":[0.027000000000000014,0.027000000000000014,0.06399999999999996,0.125,0.34300000000000025,0.21600000000000058,0.02699999999999995,0.125,0.007999999999999967,0.3429999999999996,0.02700000000000019,0.2160000000000001],"a_label":"contribution","marker":11},"value":1.1567965519315508,"value_label":"final result"}],"animation_steps_en":["Keep samples on the same time grid.","Cube the absolute residual (p=3).","Accumulate the coordinate contributions.","Take the p-th root of the accumulated p-th powers."],"echotime_status":"Low-priority addition","echotime_api":""}
