{"id":"shape_similarity","title":"EchoTime shape similarity","family":"native","definition":"echotime","intro_en":"EchoTime's shape component combines agreement in standardized levels with agreement in their first differences. Negative correlations are clipped to zero, and a geometric mean requires both views to contribute positively. The animation reproduces these intermediate views and their actual component scores on a 24-point example, making the package-specific blend explicit.","intro_zh":"EchoTime 的形状分项结合标准化水平值和一阶差分的一致性。负相关先截为零，几何平均要求两个视角都具有正贡献。动图使用 24 点示例复现各中间表示与真实分项数值，明确展示这个软件特有的组合。","steps_en":["Resample and standardize each channel with the same declared point count.","Compute Pearson correlation of aligned levels.","Compute Pearson correlation of standardized first differences.","Clip correlations to [0,1] and take their geometric mean."],"steps_zh":["按声明的点数重采样并分别标准化通道。","计算对齐水平值的 Pearson 相关。","计算标准化一阶差分的 Pearson 相关。","将相关截至 [0,1] 后取几何平均。"],"formula":"sqrt(max(r(x,y),0)*max(r(z(diff(x)),z(diff(y))),0))","caveats_en":["Clipping makes anticorrelation and zero correlation equally contribute zero.","This is a package-specific similarity component, not a calibrated probability.","The 24-point demonstration changes resolution from the default 256-point pipeline."],"caveats_zh":["截断使负相关和零相关都贡献零。","这是软件特定的相似性分项，不是校准概率。","24 点演示采用的分辨率与默认 256 点流程不同。"],"sources":[{"label":"EchoTime comparison implementation","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/similarity.py"}],"x":[0.0,0.3,0.9,1.8,2.7,2.1,1.5,1.1,1.3,2.0,2.8,3.4,3.0,2.4,2.1,2.5,3.4,4.2,4.4,4.0,3.7,3.9,4.8,5.2],"y":[1.5,2.0519225760215023,2.5029737413368567,2.8847890070498634,3.3269392741386694,2.933060886050363,2.8090394772296827,2.72585888185695,2.7447210175121164,2.9398624371786375,3.3900034277072537,4.0626233874128905,4.107225730147529,3.7653701874961145,3.286091424860995,3.2508751301708068,3.8879044257286575,4.807850340965032,5.3047858081274875,5.010505135042322,4.45690204174836,4.306684421263111,5.058860495657116,5.718268001238006],"input_label":"Deterministic synthetic illustration; sample index is the time axis.","parameters":{"n_points":24,"default_n_points":256,"channels":1,"preprocessing":"compare_series linear resampling followed by per-channel population z-score","demonstration_note":"24 points expose the computation; production default is 256"},"result":{"label":"similarity","value":0.8940448938368547,"detail":""},"frames":[{"phase":0,"caption":"Resample to 24 points and z-normalize each input","panel":{"kind":"lines","title":"Standardized level traces","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987],"a_label":"x","b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127],"b_label":"y"}},{"phase":0,"caption":"Resample to 24 points and z-normalize each input","panel":{"kind":"lines","title":"Standardized level traces","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553],"a_label":"x","b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428],"b_label":"y"}},{"phase":0,"caption":"Resample to 24 points and z-normalize each input","panel":{"kind":"lines","title":"Standardized level traces","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873,0.5486990290262495,0.2576763395979624,-0.17885769454446826,-0.3971247116156834,-0.10610202218739644,0.5486990290262495],"a_label":"x","b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826,0.42197433292498865,0.4643090708986111,0.13983363002140164,-0.31507836761056185,-0.34850424877965086,0.25613816808647405],"b_label":"y"}},{"phase":0,"caption":"Resample to 24 points and z-normalize each input","panel":{"kind":"lines","title":"Standardized level traces","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873,0.5486990290262495,0.2576763395979624,-0.17885769454446826,-0.3971247116156834,-0.10610202218739644,0.5486990290262495,1.1307444078828237,1.2762557525969673,0.9852330631686801,0.7669660460974649,0.9124773908116083,1.5672784420252541,1.8583011314535414],"a_label":"x","b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826,0.42197433292498865,0.4643090708986111,0.13983363002140164,-0.31507836761056185,-0.34850424877965086,0.25613816808647405,1.129313586318283,1.6009846130463108,1.3216653122669242,0.7962076690345238,0.6536271853119654,1.3675622628694208,1.9934451706954148],"b_label":"y"}},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712],"marker":2},"value":0.9693743694290882,"value_label":"prefix Pearson r"},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728],"marker":6},"value":0.9656661127552156,"value_label":"prefix Pearson r"},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826],"marker":10},"value":0.9542793031199115,"value_label":"prefix Pearson r"},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873,0.5486990290262495,0.2576763395979624,-0.17885769454446826,-0.3971247116156834],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826,0.42197433292498865,0.4643090708986111,0.13983363002140164,-0.31507836761056185],"marker":14},"value":0.9516220422534458,"value_label":"prefix Pearson r"},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873,0.5486990290262495,0.2576763395979624,-0.17885769454446826,-0.3971247116156834,-0.10610202218739644,0.5486990290262495,1.1307444078828237,1.2762557525969673],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826,0.42197433292498865,0.4643090708986111,0.13983363002140164,-0.31507836761056185,-0.34850424877965086,0.25613816808647405,1.129313586318283,1.6009846130463108],"marker":18},"value":0.965799005579745,"value_label":"prefix Pearson r"},{"phase":1,"caption":"Measure level correlation on aligned samples","panel":{"kind":"scatter","title":"Standardized level pairs","a":[-1.9249938311141905,-1.7067268140429754,-1.2701927799005448,-0.6153917286868987,0.039409322526747226,-0.3971247116156834,-0.833658745758114,-1.1246814351864012,-0.9791700904722576,-0.4698803839727553,0.11216499488381873,0.5486990290262495,0.2576763395979624,-0.17885769454446826,-0.3971247116156834,-0.10610202218739644,0.5486990290262495,1.1307444078828237,1.2762557525969673,0.9852330631686801,0.7669660460974649,0.9124773908116083,1.5672784420252541,1.8583011314535414],"b":[-2.010364037206175,-1.4865014729321389,-1.0583819678664712,-0.6959783756503127,-0.27630724282358066,-0.6501606624163054,-0.767876762594728,-0.8468284161108967,-0.8289252405908301,-0.6437049054498428,-0.216449301442826,0.42197433292498865,0.4643090708986111,0.13983363002140164,-0.31507836761056185,-0.34850424877965086,0.25613816808647405,1.129313586318283,1.6009846130463108,1.3216653122669242,0.7962076690345238,0.6536271853119654,1.3675622628694208,1.9934451706954148],"marker":23},"value":0.9756415824076952,"value_label":"prefix Pearson r"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587],"b_label":"y"},"value":-0.9942849893238179,"value_label":"prefix difference correlation"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207,1.2371922850773205,-1.5165582849334895,-1.5165582849334895,-1.1493915422653818],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587,0.6046591511482543,-1.3490321779414889,-0.7184111612757136,-0.6229714384718065],"b_label":"y"},"value":0.8850515578287453,"value_label":"prefix difference correlation"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207,1.2371922850773205,-1.5165582849334895,-1.5165582849334895,-1.1493915422653818,-0.047891314261057395,0.8700255424092123,1.053608913743266,0.6864421710751587],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587,0.6046591511482543,-1.3490321779414889,-0.7184111612757136,-0.6229714384718065,-0.38451071398430725,0.02743127692528874,0.6233324430274709,1.1432371499945881],"b_label":"y"},"value":0.8324503872807925,"value_label":"prefix difference correlation"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207,1.2371922850773205,-1.5165582849334895,-1.5165582849334895,-1.1493915422653818,-0.047891314261057395,0.8700255424092123,1.053608913743266,0.6864421710751587,-1.1493915422653815,-1.5165582849334895,-0.9658081709313272,0.31927542840705014],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587,0.6046591511482543,-1.3490321779414889,-0.7184111612757136,-0.6229714384718065,-0.38451071398430725,0.02743127692528874,0.6233324430274709,1.1432371499945881,-0.3243591640718407,-1.227461486057608,-1.5486018580235412,-0.5108850431442582],"b_label":"y"},"value":0.8162055142741074,"value_label":"prefix difference correlation"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207,1.2371922850773205,-1.5165582849334895,-1.5165582849334895,-1.1493915422653818,-0.047891314261057395,0.8700255424092123,1.053608913743266,0.6864421710751587,-1.1493915422653815,-1.5165582849334895,-0.9658081709313272,0.31927542840705014,1.2371922850773203,1.0536089137432667,-0.047891314261057395,-1.149391542265382],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587,0.6046591511482543,-1.3490321779414889,-0.7184111612757136,-0.6229714384718065,-0.38451071398430725,0.02743127692528874,0.6233324430274709,1.1432371499945881,-0.3243591640718407,-1.227461486057608,-1.5486018580235412,-0.5108850431442582,1.060066350152393,1.7212060650395784,0.7326851101671589,-1.1162851411098784],"b_label":"y"},"value":0.8270977550437907,"value_label":"prefix difference correlation"},{"phase":2,"caption":"Compare re-normalized first differences","panel":{"kind":"lines","title":"Standardized first-difference pairs","a":[0.13569205707299586,0.6864421710751585,1.2371922850773207,1.2371922850773205,-1.5165582849334895,-1.5165582849334895,-1.1493915422653818,-0.047891314261057395,0.8700255424092123,1.053608913743266,0.6864421710751587,-1.1493915422653815,-1.5165582849334895,-0.9658081709313272,0.31927542840705014,1.2371922850773203,1.0536089137432667,-0.047891314261057395,-1.149391542265382,-0.9658081709313273,-0.04789131426105795,1.2371922850773203,0.3192754284070508],"a_label":"x","b":[0.8611829040219345,0.6254594043197607,0.4636640210189587,0.6046591511482543,-1.3490321779414889,-0.7184111612757136,-0.6229714384718065,-0.38451071398430725,0.02743127692528874,0.6233324430274709,1.1432371499945881,-0.3243591640718407,-1.227461486057608,-1.5486018580235412,-0.5108850431442582,1.060066350152393,1.7212060650395784,0.7326851101671589,-1.1162851411098784,-1.7222882495717105,-0.7796283351933038,1.3291495472315065,1.1123613457985642],"b_label":"y"},"value":0.8192724527210029,"value_label":"prefix difference correlation"},{"phase":3,"caption":"Clip both correlations to [0,1], then take their geometric mean","panel":{"kind":"bars","title":"Level, change and combined similarity","a":[0.9756415824076952,0.8192724527210029,0.8940448938368547],"a_label":"contribution","marker":0,"labels":["level","change","GM"]},"value":0.8940448938368547,"value_label":"shape similarity"},{"phase":3,"caption":"Clip both correlations to [0,1], then take their geometric mean","panel":{"kind":"bars","title":"Level, change and combined similarity","a":[0.9756415824076952,0.8192724527210029,0.8940448938368547],"a_label":"contribution","marker":1,"labels":["level","change","GM"]},"value":0.8940448938368547,"value_label":"shape similarity"},{"phase":3,"caption":"Clip both correlations to [0,1], then take their geometric mean","panel":{"kind":"bars","title":"Level, change and combined similarity","a":[0.9756415824076952,0.8192724527210029,0.8940448938368547],"a_label":"contribution","marker":2,"labels":["level","change","GM"]},"value":0.8940448938368547,"value_label":"shape similarity"},{"phase":3,"caption":"Clip both correlations to [0,1], then take their geometric mean","panel":{"kind":"bars","title":"Level, change and combined similarity","a":[0.9756415824076952,0.8192724527210029,0.8940448938368547],"a_label":"contribution","marker":0,"labels":["level","change","GM"]},"value":0.8940448938368547,"value_label":"shape similarity"}],"checks":{"api":"compare_series(..., n_points=24): shape_similarity","expected":0.8940448938368547,"observed":0.8940448938368547,"tolerance":1e-11},"animation_steps_en":["Resample and z-normalize the input series.","Measure level correlation.","Measure correlation of standardized first differences.","Clip correlations and take their geometric mean."],"echotime_status":"EchoTime report component / reference metric","echotime_api":"shape_similarity"}
