{"id":"random_projection_embedding_distance","title":"Fixed Gaussian projection embedding distance","family":"embedding","definition":"reference","intro_en":"Multiply both 16-coordinate inputs by the same six-by-16 Gaussian matrix. Each output coordinate is a weighted sum of all observations. The matrix is fixed by an explicit random seed, allowing the comparison to be reproduced without fitting a neural encoder. Euclidean distance retains differences in both vector scale and coordinates.","intro_zh":"将两个 16 维输入乘以同一个六乘十六高斯矩阵。每个输出坐标都是全部观测的加权和。矩阵由明确的随机种子固定，因此无需拟合神经编码器也可复现比较。 欧氏距离同时保留向量尺度与坐标差异。","steps_en":["Use the same fixed matrix with entries N(0,1/6) to project both inputs to six dimensions.","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":["使用同一个元素分布为 N(0,1/6) 的固定矩阵，把两条输入投影到六维。","把计算得到的坐标按同一个固定顺序组成两个向量。","对坐标差计算欧氏范数。","结合表示所舍弃的信息，在该表示空间中解释分数。"],"animation_steps_en":["Multiply both inputs by the same fixed Gaussian matrix.","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":["The six-dimensional example has no asserted distortion guarantee. Johnson-Lindenstrauss guarantees require dimensions and probability assumptions tied to a finite point set.","Changing the random seed changes the representation; a shared matrix and identical input length/order are essential.","A metric on these feature vectors can be only a pseudometric on the original series when the representation loses information."],"caveats_zh":["本例六维投影不声称满足给定失真保证。Johnson-Lindenstrauss 保证需要维数、概率与有限样本集等条件。","改变随机种子会改变表示；必须共享矩阵并保持输入长度及顺序一致。","当表示损失信息时，特征空间中的度量在原序列空间上可能只是伪度量。"],"sources":[{"label":"scikit-learn: Gaussian random projection","url":"https://scikit-learn.org/stable/modules/random_projection.html"},{"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":{"seed":20261029,"matrix_shape":[6,16],"entry_variance":0.16666666666666666,"matrix":[[-0.5194508388046408,0.6925531409100528,0.5276738178253589,0.3421103162417348,-0.24189739800758292,-0.9318042670330671,-0.34699445019019953,0.14895157038933,0.6577606001663231,-0.21587247502476686,-0.2105641686898666,-0.015183263110597449,-0.20443004209346777,-0.10526240498773033,-0.5486230062454652,0.4718299455848165],[0.2327057158176952,0.6454625109247026,-0.12318259251046923,0.25288704457474365,0.5299530066457878,0.14748919107826164,-0.5529611921267462,-0.7973348966527448,-0.08858696791282737,0.3087051680423722,-0.007836755555181388,0.019690312134448135,0.006657913594121614,0.3019453761132193,-0.19151184428095228,-0.13148287000823003],[0.21955486202821017,0.48781296520432166,0.07854972933328519,0.02919957197589381,0.6884227119244153,-0.09857667067434531,-0.5437985569677152,-0.4491742559455326,0.08120241246922642,0.3630345341848169,0.30908359446022704,-0.7365370367941714,0.15527484782427062,-0.4016272660891914,-0.12859587242424278,-0.5582775404109902],[-0.44441214068371343,-0.6466959020726512,-0.08407162511751691,0.03746271400150741,0.6884879939914507,0.22936749259862166,-0.019760913537307537,0.2904130430090459,0.15322119753002061,-0.225364493051222,0.49494073969284363,-0.2821395369092543,0.41034750400122044,-0.16927341099846036,-0.07673290479639887,0.12944873559450343],[-0.51820184901937,-0.25613690547027307,0.6864569705061614,0.11672156402718992,0.12811765966664293,0.4888237591453126,0.6243619724292387,0.10779096348337862,-0.24638569673590888,0.35934223480128535,0.31266069712623906,0.42222017603534623,-0.42806978292645914,0.6200435544376961,-0.32300884834046717,0.31090852239967715],[-1.0255688097145366,0.006464660794459475,0.037491746873668665,-0.2758645415506253,-0.17787689637825516,-0.1919426644991183,-0.23769543055234207,-0.16238956597387602,0.05048832099679738,-0.24592874184414845,0.007701695534513878,0.07873697208976303,-0.4160840825154048,0.5885124515203,0.18272399200616546,0.17656027328524054]],"comparison":"euclidean"},"result":{"label":"distance","value":2.174781121242675,"detail":"Computed from the explicitly defined illustrative encoder; no learned weights."},"frames":[{"phase":0,"caption":"Projection coordinate 1: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 1","a":[-0.0,0.6073148720578276,0.42713845297264874,0.2690342195118247,-0.0944671237939795,0.5375780942567937,0.20819667011411974,-0.014280063649382977,0.13778401440897162,-0.2345230156265277,-0.334907698392492,-0.015120564041720803,-0.1226580252560807,-0.021487160600499235,0.2142513225611084,0.05360172050769838],"a_label":"x weighted","b":[0.1040616311533198,0.12812233106835977,0.30094825384219404,0.34382086782294347,-0.24197724492547132,-0.302836386785747,0.12156259553845493,-0.05287780748821216,0.052403730520251754,-0.10038070088651659,-0.17904904764739188,-0.019510493097117713,-0.2617379333520078,-0.06368375501757688,0.03858470315042465,-0.035387245918861436],"b_label":"y weighted"},"value":1.61745571503031,"value_label":"x projection 1"},{"phase":0,"caption":"Projection coordinate 2: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 2","a":[0.0,0.5660200771384154,-0.09971315653848876,0.19886938636993493,0.2069602099739407,-0.0850897136539023,0.3317767152760478,0.07644090655986141,-0.018556702940646954,0.33537609155815207,-0.012464560243941842,0.019609001270786772,0.00399474815647297,0.06163595435501537,0.07479027575623153,-0.014936966412752373],"a_label":"x weighted","b":[-0.04661795603683201,0.11941056452106999,-0.07025473856663778,0.2541514797976173,0.5301279366555973,0.04793398710043506,0.1937189419315504,0.2830538883117245,-0.007057716124888194,0.14354790313970306,-0.006663829024335623,0.025302051092765843,0.008524327083809334,0.18267695254849775,0.0134690444572146,0.009861215250617308],"b_label":"y weighted"},"value":1.6447122666251266,"value_label":"x projection 2"},{"phase":0,"caption":"Projection coordinate 3: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 3","a":[0.0,0.42777377077795853,0.06358399589942153,0.022962429613093346,0.26884668494000163,0.05687101962735867,0.32627913418062915,0.04306256689876378,0.017009827537365452,0.3943993032174527,0.4916053660773419,-0.7334955175855682,0.0931649086945624,-0.0819839672958623,0.05021997879991626,-0.06342250416035942],"a_label":"x weighted","b":[-0.04398344436765882,0.0902453985627995,0.044799273877281776,0.029345569835773275,0.6886499505479156,-0.03203741796916224,0.19050899516930914,0.15945686086066413,0.006469389226955314,0.16881105839593985,0.26282307942452715,-0.9464500922805098,0.19880305925139133,-0.24298449598396088,0.00904415875268501,0.0418708155308245],"b_label":"y weighted"},"value":1.3768769972220756,"value_label":"x projection 3"},{"phase":0,"caption":"Projection coordinate 4: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 4","a":[-0.0,-0.5671016645906495,-0.06805382923789038,0.02946053230113242,0.2688721792576708,-0.13232708189696518,0.011856548122384524,-0.027842047773920256,0.03209592013096855,-0.24483510702071873,0.787215911437191,-0.28097444570793334,0.24620850240073236,-0.03455369434074961,0.029966162828447676,0.014705880816469327],"a_label":"x weighted","b":[0.08902912231368734,-0.11963874188344047,-0.04794857717417779,0.03765002757151495,0.6887152541636401,0.07454443509455208,0.006922842536788047,-0.10309663026821132,0.01220711964706177,-0.10479448926881822,0.4208630016934316,-0.36254930492839166,0.5253802550425933,-0.10241041365406856,0.005396631784913083,-0.009708655169587813],"b_label":"y weighted"},"value":0.06469376672616978,"value_label":"x projection 4"},{"phase":0,"caption":"Projection coordinate 5: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 5","a":[-0.0,-0.22461200850314245,0.5556693519922484,0.0917893830949717,0.05003322448116739,-0.28201303016726126,-0.3746171834575433,-0.010333975099071708,-0.051611498743829885,0.39038800355582404,0.4972948394015152,0.42047662382884643,-0.2568418697558756,0.12656917191907335,0.12614322069629322,0.0353204197340061],"a_label":"x weighted","b":[0.1038114209223609,-0.047385327512000516,0.3915070629485069,0.11730517184732585,0.12815994949834728,0.15886772172222668,-0.21873278342752925,-0.03826579203659942,-0.01962952729690437,0.1670941391825977,0.2658647974417542,0.5425529262054197,-0.5480706219411091,0.37512635043480624,0.022717240046986237,-0.023318139179975918],"b_label":"y weighted"},"value":1.0936546729772219,"value_label":"x projection 5"},{"phase":0,"caption":"Projection coordinate 6: sum samples times one shared matrix row.","panel":{"kind":"lines","title":"Weighted samples for projection 6","a":[-0.0,0.005669001281440035,0.030348609724201035,-0.21693880045002253,-0.06946547969782933,0.11073588675071547,0.14261725833140526,0.015568371196365314,0.010576011311635995,-0.26717602677187263,0.01224974382504191,0.07841182888436413,-0.24965044950924295,0.12013274409495199,-0.07135839457204671,0.020057935088600824],"a_label":"x weighted","b":[0.2054522877361265,0.001195962246975003,0.02138267121462224,-0.2772438642583784,-0.17793561103189073,-0.06238136596221348,0.08327186060104129,0.057648295920726005,0.004022400197377466,-0.11435686495752902,0.006548983425361127,0.10117700913534546,-0.5327249691043732,0.3560500331697816,-0.012850994051940996,-0.013242020496393116],"b_label":"y weighted"},"value":-0.32822176051229224,"value_label":"x projection 6"},{"phase":1,"caption":"Expose 1 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102],"a_label":"x features","b":[-0.1679365020229543],"b_label":"y features","labels":["proj 1"],"marker":0}},{"phase":1,"caption":"Expose 2 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102,1.6447122666251266],"a_label":"x features","b":[-0.1679365020229543,1.681184052137909],"b_label":"y features","labels":["proj 1","proj 2"],"marker":1}},{"phase":1,"caption":"Expose 3 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102,1.6447122666251266,1.3768769972220753],"a_label":"x features","b":[-0.1679365020229543,1.681184052137909,0.6253721588347748],"b_label":"y features","labels":["proj 1","proj 2","proj 3"],"marker":2}},{"phase":1,"caption":"Expose 4 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102,1.6447122666251266,1.3768769972220753,0.06469376672616978],"a_label":"x features","b":[-0.1679365020229543,1.681184052137909,0.6253721588347748,1.0105618775014866],"b_label":"y features","labels":["proj 1","proj 2","proj 3","proj 4"],"marker":3}},{"phase":1,"caption":"Expose 5 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102,1.6447122666251266,1.3768769972220753,0.06469376672616978,1.0936546729772219],"a_label":"x features","b":[-0.1679365020229543,1.681184052137909,0.6253721588347748,1.0105618775014866,1.377604588856213],"b_label":"y features","labels":["proj 1","proj 2","proj 3","proj 4","proj 5"],"marker":4}},{"phase":1,"caption":"Expose 6 of 6 coordinates; each has the same meaning in x and y.","panel":{"kind":"bars","title":"Feature vectors","a":[1.6174557150303102,1.6447122666251266,1.3768769972220753,0.06469376672616978,1.0936546729772219,-0.3282217605122922],"a_label":"x features","b":[-0.1679365020229543,1.681184052137909,0.6253721588347748,1.0105618775014866,1.377604588856213,-0.35398618621536226],"b_label":"y features","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":5}},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371],"a_label":"contributions","labels":["proj 1"],"marker":0},"value":1.7853922170532646,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966],"a_label":"contributions","labels":["proj 1","proj 2"],"marker":1},"value":1.785764698904327,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227],"a_label":"contributions","labels":["proj 1","proj 2","proj 3"],"marker":2},"value":1.9374506656873574,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4"],"marker":3},"value":2.156010566985712,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5"],"marker":4},"value":2.174628501533477,"value_label":"partial distance"},{"phase":2,"caption":"Accumulate squared differences, then take the square root.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612,0.0006638056318090182],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":5},"value":2.174781121242675,"value_label":"partial distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612,0.0006638056318090182],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":0},"value":2.174781121242675,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612,0.0006638056318090182],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":2},"value":2.174781121242675,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612,0.0006638056318090182],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":4},"value":2.174781121242675,"value_label":"final distance"},{"phase":3,"caption":"Read the completed comparison using every retained coordinate.","panel":{"kind":"bars","title":"Squared coordinate differences","a":[3.187625368714371,0.0013301911384903966,0.5647595221195227,0.8946664829816671,0.08062755472768612,0.0006638056318090182],"a_label":"contributions","labels":["proj 1","proj 2","proj 3","proj 4","proj 5","proj 6"],"marker":5},"value":2.174781121242675,"value_label":"final distance"}],"echotime_status":"Low-priority addition","echotime_api":""}
