photoprism/internal/face/embedding_test.go

232 lines
376 KiB
Go
Raw Normal View History

package face
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestEmbedding_Blacklisted(t *testing.T) {
t.Run("Blur1", func(t *testing.T) {
e := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.0078794
t.Logf("Blur1 magnitude: %f", e.Magnitude())
t.Logf("Blur1 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Blur2", func(t *testing.T) {
e := Embedding{-0.040659550577402115, -0.03220542520284653, 0.05863650515675545, 0.07900159806013107, -0.03954162076115608, -0.03830844908952713, -0.09981349855661392, -0.03843552619218826, 0.021984204649925232, 0.021209893748164177, 0.05058338865637779, 0.026279529556632042, -0.037386082112789154, 0.019860034808516502, 0.01779518648982048, 0.029238300397992134, 0.025665590539574623, 0.053838297724723816, 0.01769574172794819, 0.04497014731168747, -0.0034581704530864954, 0.05082075297832489, 0.00983431376516819, -0.055299241095781326, -0.08863261342048645, 0.026919297873973846, -0.003238844918087125, 0.06171567738056183, -0.006652790121734142, 0.03024955280125141, -0.07668674737215042, 0.02599654719233513, 0.03656956925988197, -0.040286894887685776, -0.07485620677471161, 0.007622404955327511, 0.004450628533959389, 0.022175054997205734, 0.024441875517368317, 0.02038322575390339, -0.008045016787946224, 0.02700800821185112, 0.037923432886600494, 0.037730343639850616, 0.0019298223778605461, -0.025241704657673836, 0.07439867407083511, 0.025373654440045357, -0.062184471637010574, 0.019462162628769875, 0.011163688264787197, 0.05711067467927933, -0.007787591777741909, 0.006090524140745401, -0.01247440930455923, -0.0002892761258408427, -0.022054091095924377, 0.09874352067708969, 0.02230732887983322, -0.03625740855932236, 0.01047681737691164, 0.023006660863757133, -0.03572215884923935, -0.047631122171878815, -0.004130185581743717, 0.13868559896945953, 0.004021449480205774, 0.0056119272485375404, -0.03055204637348652, 0.03540297970175743, 0.08558189123868942, 0.04478949308395386, 0.08267980813980103, 0.0001782427862053737, -0.09348706901073456, 0.01561333891004324, -0.012885896489024162, 0.01995423436164856, -0.06154691055417061, -0.021583547815680504, 0.07658854871988297, 0.03818646818399429, 0.019400358200073242, 0.048004768788814545, 0.03896840661764145, 0.007684631273150444, 0.006036552134901285, 0.061359286308288574, -0.06359504908323288, 0.06033588945865631, 0.003095539752393961, 0.01086103729903698, 0.024172229692339897, 0.035893380641937256, -0.015560186468064785, 0.0011388470884412527, 0.01351285818964243, 0.05575203895568848, -0.006037220358848572, -0.04045598953962326, 0.001389052253216505, -0.02900969795882702, -0.044179223477840424, -0.012978514656424522, 0.036748431622982025, 0.009548956528306007, 0.12157998234033585, -0.027398979291319847, -0.028363993391394615, 0.03085082396864891, -0.03142939507961273, -0.033452536910772324, -0.062204647809267044, 0.03741671144962311, -0.037081167101860046, 0.005499409511685371, 0.042599402368068695, 0.026988882571458817, 0.037901923060417175, 0.026043692603707314, -0.02773086354136467, -0.07317446917295456, 0.000101863632153254, 0.01806195266544819, -0.03163762018084526, -0.049250949174165726, 0.017383672297000885, 0.06737986952066422, -0.018057355657219887, -0.03998659923672676, 0.005807057488709688, -0.028374463319778442, 0.026576239615678787, -0.01071916613727808, -0.05852247774600983, 0.01768427900969982, -0.04401516914367676, 0.0035484740510582924, 0.01177794486284256, 0.029788490384817123, 0.0022414580453187227, 0.012311144731938839, 0.014886411838233471, 0.060596615076065063, -0.00679460633546114, -0.01986791379749775, 0.017852429300546646, -0.03839694708585739, -0.010994594544172287, 0.0516304187476635, 0.06284306943416595, -0.009843732230365276, -0.033825311809778214, 0.010088239796459675, 0.002782990923151374, -0.007669741753488779, 0.0036510066129267216, -0.0347248837351799, -0.034374918788671494, -0.015334841795265675, 0.06460481137037277, -0.01482471451163292, -0.022562984377145767, 0.0660383328795433, 0.039143770933151245, -0.04959432780742645, -0.04688224941492081, -0.08884536474943161, 0.035801686346530914, -0.011035206727683544, -0.048159871250391006, -0.012846723198890686, -0.08550407737493515, -0.02462676912546158, -0.05736429616808891, -0.023693742230534554, 0.06937230378389359, 0.008348439820110798, 0.046880267560482025, -0.007452292367815971, -0.026880638673901558, -0.02645084448158741, -0.008707266300916672, 0.039963752031326294, -0.039603643119335175, 0.0
t.Logf("Blur2 magnitude: %f", e.Magnitude())
t.Logf("Blur2 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Blossom", func(t *testing.T) {
e := Embedding{0.01821020431816578, -0.023437567055225372, 0.02064298279583454, 0.03490285202860832, -0.0062901671044528484, -0.0064063891768455505, -0.06233056262135506, 0.07121828943490982, -0.055571429431438446, 0.029558930546045303, 0.02178776264190674, 0.0220812875777483, -0.027457213029265404, -0.025004200637340546, -0.051860060542821884, -0.030478717759251595, 0.014104194939136505, 0.014726600609719753, -0.016185864806175232, -0.05630311742424965, -0.0007384912460111082, 0.017833851277828217, 0.007466004230082035, -0.018245164304971695, -0.04465140774846077, -0.05149618908762932, 0.04039151966571808, 0.017037857323884964, -0.015094432048499584, 0.06189686432480812, -0.05963028967380524, -0.07761456072330475, 0.034639403223991394, -0.028443966060876846, 0.01655958592891693, -0.005933939013630152, -0.08745292574167252, -0.02694937400519848, -0.014408857561647892, -0.010446715168654919, -0.023589249700307846, 0.0663442462682724, 0.04909157380461693, -0.0023503690026700497, -0.008410140872001648, 0.12164326012134552, -0.010511402040719986, -0.0047544874250888824, -0.023863354697823524, 0.010045552626252174, 0.018847299739718437, 0.010298987850546837, 0.05359936133027077, 0.052733056247234344, -0.01727156713604927, 0.0053423019126057625, 0.08065354824066162, 0.01277188304811716, -0.01914011314511299, 0.02162299118936062, -0.04849407821893692, 0.0037366875912994146, 0.032514866441488266, 0.011288965120911598, 0.013276362791657448, 0.03930341452360153, 0.029594801366329193, -0.01013986300677061, 0.07746551930904388, -0.0016483333893120289, 0.04333961382508278, 0.03994179517030716, 0.03702109307050705, -0.01800084114074707, -0.049653515219688416, 0.05364584922790527, -0.0504317507147789, -0.03479231148958206, 0.004587068222463131, 0.09297594428062439, 0.044500891119241714, -0.018745509907603264, 0.08215191960334778, 0.06747566908597946, 0.020649220794439316, 0.028046701103448868, 0.01492240559309721, -0.022446198388934135, 0.07280460745096207, 0.008448442444205284, -0.03950385004281998, 0.032330770045518875, -0.013169591315090656, -0.04713238403201103, -0.00909704715013504, 0.015205003321170807, -0.067038394510746, 0.03143712505698204, -0.01801210083067417, 0.005371224135160446, 0.04291990026831627, -0.00790275726467371, -0.003694827202707529, 0.1136225163936615, 0.008553439751267433, 0.054057661443948746, 0.0502188578248024, -0.024207832291722298, -0.00015020646969787776, -0.052836786955595016, -0.04804473742842674, 0.05141591280698776, -0.038935597985982895, -0.04706438630819321, -0.05428919941186905, -0.022000353783369064, -0.023962095379829407, 0.0426950640976429, 0.0559995099902153, 0.004074506461620331, -0.023693080991506577, -0.06507810205221176, -0.04261104762554169, -0.0970754623413086, 0.04138507321476936, 0.03040129691362381, -0.015875818207859993, 0.03040211647748947, -0.010607944801449776, -0.03460313007235527, -0.045270007103681564, 0.00034321434213779867, -0.030485179275274277, 0.014731010422110558, 0.004268650896847248, 0.04292090982198715, -0.07705771178007126, 0.056689731776714325, -0.020848767831921577, 0.08218804746866226, -0.021235274150967598, 0.06583341956138611, -0.002099075121805072, -0.03269239515066147, -0.005792548414319754, 0.03422548994421959, -0.01988036558032036, 0.012263544835150242, -0.03256846219301224, 0.07840777188539505, 0.06540852040052414, -0.05114790052175522, -0.07009473443031311, 0.07534696906805038, -0.04867268726229668, 0.027016332373023033, -0.021471483632922173, -0.012011591345071793, -0.08289984613656998, -0.03958273306488991, 0.055009711533784866, -0.014064125716686249, -0.08779940754175186, 0.026738431304693222, 0.01273905299603939, 0.0124049698933959, 0.008448999375104904, -0.011322328820824623, -0.0634634867310524, 0.016120076179504395, -0.01175830326974392, -0.015636304393410683, -0.03191705048084259, -0.02122354879975319, -0.008227435871958733, 0.05059107020497322, 0.09470821171998978, -0.044920746237039566, -0.027742912992835045, -0.0996212437748909, -0.01948167383670807, -0.025936149060726166, 0.032206397503614426, 0.01575576327741146, 0.0009050318039953709, 0.021
t.Logf("Blossom magnitude: %f", e.Magnitude())
t.Logf("Blossom blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Garden", func(t *testing.T) {
e := Embedding{0.029450472444295883, -0.02616771124303341, -0.11108852177858353, 0.025850815698504448, 0.015543344430625439, 0.03766537457704544, -0.04337846487760544, 0.015028399415314198, 0.03251208737492561, -0.06619285047054291, 0.007508732844144106, 0.06546419113874435, 0.1066984161734581, 0.0071456413716077805, 0.01691155694425106, 0.021115683019161224, 0.04886350408196449, 0.01571810245513916, 0.029032830148935318, -0.038796234875917435, -0.019296901300549507, -0.04544328525662422, 0.016262134537100792, -0.02470661699771881, 0.03579603135585785, -0.03756109997630119, -0.018320731818675995, 0.016431592404842377, 0.041621048003435135, 0.01632954552769661, 0.043801672756671906, -0.013622266240417957, -0.024091172963380814, -0.01047056820243597, -0.0717235654592514, 0.030399976298213005, 0.0029641836881637573, 0.023096470162272453, -0.05693362280726433, 0.06622857600450516, -0.05393676459789276, 0.01174027007073164, -0.00613653426989913, 0.0038851420395076275, 0.054551538079977036, 0.007108299061655998, 0.04403809458017349, -0.013658964075148106, -0.05020412057638168, -0.05926354601979256, -0.03387290984392166, -0.008434981107711792, 0.06530085951089859, 0.005070003680884838, -0.1048368364572525, 0.03507135808467865, 0.033572934567928314, 0.015251096338033676, -0.00012248411076143384, -0.032828059047460556, 0.03628222644329071, 0.03946855291724205, -0.0918068215250969, -0.021505288779735565, -0.02622317150235176, 0.09578832983970642, 0.01902947574853897, -0.008162671700119972, -0.05887138843536377, -0.0024935337714850903, -0.008546892553567886, -0.04424794018268585, 0.0038465987890958786, 0.002760303905233741, 0.026545381173491478, -0.09035931527614594, -0.06550516188144684, 0.05472956597805023, -0.059070128947496414, 0.008197394199669361, -0.03392776474356651, 0.026817528530955315, -0.010464455932378769, 0.001113097881898284, 0.0023126716259866953, -0.044506292790174484, -0.0758674368262291, 0.09812213480472565, -0.09673517942428589, 0.026506630703806877, 0.07263437658548355, 0.014737484976649284, 0.037864066660404205, -0.06617224961519241, 0.07685885578393936, 0.006310991942882538, 0.05843469873070717, 0.0027755044866353273, -0.030848920345306396, 0.04541933164000511, -0.05647830292582512, 0.012519258074462414, 0.02998855710029602, -0.03085692599415779, 0.0005864879349246621, 0.012187357991933823, -0.05132580175995827, -0.028619755059480667, -0.04047640413045883, 0.058719534426927567, 0.03181275725364685, 0.019011132419109344, -0.05842473730444908, -0.015319367870688438, 0.04820026084780693, -0.016459070146083832, 0.03458268567919731, 0.001874488894827664, -0.013077832758426666, 0.02509528025984764, -0.048245035111904144, 0.04755201190710068, 0.00040619823266752064, -0.006477742921561003, -0.017052823677659035, -0.03611822798848152, -0.010736986994743347, -0.02222706750035286, 0.000539301719982177, -0.06059937924146652, -0.018812399357557297, 0.050949569791555405, 0.06928367912769318, -0.014493902213871479, -0.032616883516311646, 0.02133842743933201, 0.04201561212539673, -0.03689774498343468, 0.049148887395858765, -0.032536156475543976, -0.04299809783697128, -0.05552523210644722, -0.05443565547466278, 0.011141049675643444, 0.07847368717193604, -0.07231663167476654, -0.05813386291265488, -0.03650275990366936, 0.06985370069742203, -0.03931870684027672, 0.008845476433634758, -0.0020725291687995195, -0.015220901928842068, 0.06117389723658562, 0.10758516937494278, -0.013337242417037487, 0.03648245334625244, 0.013812883757054806, 0.09391376376152039, 0.0012934838887304068, 0.04713243618607521, 0.04327142611145973, 0.06456369161605835, 0.0010187046136707067, 0.033284563571214676, 0.009135677479207516, -0.0055849673226475716, -0.034351810812950134, 0.0419909730553627, 0.03832126036286354, -0.07917091250419617, 0.07005874067544937, 0.032630279660224915, -0.028495419770479202, 0.039456479251384735, -0.027076352387666702, 0.058908965438604355, -0.011201824992895126, -0.011499661952257156, -0.04332108050584793, -0.019344458356499672, -0.01729557476937771, -0.15135915577411652, 0.009244582615792751, 0.010274229571223259, 0.08
t.Logf("Garden magnitude: %f", e.Magnitude())
t.Logf("Garden blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Display", func(t *testing.T) {
e := Embedding{0.0655992180109024, -0.060943927615880966, 0.025899292901158333, 0.03808552771806717, -0.04981048032641411, -0.004682519938796759, -0.06709564477205276, 0.022405026480555534, 0.010651858523488045, -0.0972324013710022, -0.013849357143044472, 0.0011598772834986448, 0.006587308831512928, -0.006890364456921816, 0.03757510706782341, -0.03782757744193077, 0.000490826612804085, 0.05040956288576126, 0.029240766540169716, -0.035022664815187454, 0.01888369210064411, -0.021399375051259995, 0.003074551932513714, -0.021185049787163734, -0.0377926342189312, 0.03270004689693451, -0.04605064168572426, -0.002903539454564452, 0.011726617813110352, 0.03316459059715271, -0.045815564692020416, -0.003511677961796522, -0.033213693648576736, -0.030844159424304962, -0.043423403054475784, 0.021912800148129463, -0.04079496115446091, 0.061183080077171326, -0.06081172451376915, 0.05624420568346977, -0.03900836035609245, 0.08319094777107239, -0.06132802739739418, -0.011510769836604595, -0.026012219488620758, -0.007052286993712187, 0.05201044678688049, 0.029154257848858833, -0.06337668001651764, -0.0580013245344162, -0.05830046534538269, 0.036203619092702866, 0.011156917549669743, 0.06063550338149071, 0.028784630820155144, 0.05912322178483009, 0.10632403939962387, 0.008772610686719418, 0.04818073287606239, 0.03507508337497711, -0.07639612257480621, -0.007033055182546377, -0.00663603562861681, -0.006748252082616091, 0.05110344663262367, 0.09969019144773483, -0.012281601317226887, -0.0030436126980930567, -0.031047532334923744, -0.10100607573986053, -0.03562569245696068, 0.013750459998846054, 0.06335050612688065, -0.0520850233733654, 0.03574710711836815, -0.04770904406905174, -0.0494241788983345, 0.027270007878541946, -0.0320739708840847, -0.015194443054497242, 0.012237058952450752, -0.061840206384658813, 0.08665748685598373, 0.0651669055223465, -0.024673549458384514, 0.009629106149077415, -0.07379230856895447, 0.03019821271300316, -0.0026627276092767715, 0.028849635273218155, 0.04702817276120186, 0.07788898050785065, -0.0025648365262895823, 0.000009289172339776997, -0.02528950944542885, -0.017335202544927597, -0.04004426673054695, -0.016199011355638504, -0.03581972047686577, -0.008861823007464409, -0.0006539548048749566, -0.07807868719100952, -0.015390733256936073, 0.03235028684139252, 0.08752002567052841, -0.003604553174227476, 0.031287387013435364, -0.07505817711353302, -0.05587371066212654, -0.008831081911921501, -0.03359704837203026, 0.11381039023399353, -0.05182214081287384, 0.04337158799171448, -0.026881251484155655, 0.007756576873362064, -0.01063851360231638, -0.010440814308822155, -0.042394544929265976, -0.002712261863052845, -0.07624521851539612, -0.02908874675631523, 0.042222071439027786, -0.04457511380314827, 0.01811922714114189, -0.019151516258716583, -0.025909194722771645, -0.045582059770822525, 0.05103086680173874, -0.03155111148953438, -0.009922410361468792, 0.03185242787003517, 0.04041089490056038, 0.02876642346382141, 0.01018585916608572, 0.09116721153259277, -0.01409385446459055, 0.003687146818265319, 0.016644645482301712, -0.03938820958137512, -0.013990030623972416, 0.019131259992718697, -0.014485188759863377, 0.014388926327228546, 0.055811140686273575, -0.040063563734292984, -0.03232697769999504, -0.014766386710107327, -0.01749183051288128, 0.08663495630025864, 0.06876286119222641, -0.062139105051755905, -0.0431712307035923, 0.0048091537319123745, 0.007186077069491148, 0.05357756093144417, 0.020793680101633072, 0.010240933857858181, -0.05540792644023895, -0.05149132013320923, 0.019307436421513557, -0.011936662718653679, -0.09017080068588257, -0.015014625154435635, -0.008471742272377014, 0.06599333137273788, -0.05772527679800987, 0.003727627918124199, -0.04029823839664459, 0.019866151735186577, -0.0007386537035927176, -0.04396585002541542, 0.020981401205062866, -0.010769529268145561, 0.010821862146258354, -0.040240708738565445, 0.05260854586958885, -0.05224558711051941, -0.029141021892428398, -0.02974228747189045, 0.0331847257912159, 0.008872824721038342, 0.03084380552172661, -0.029272574931383133, -0.040709789842367
t.Logf("Display magnitude: %f", e.Magnitude())
t.Logf("Display blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Pattern", func(t *testing.T) {
e := Embedding{0.011182552203536034, -0.03198026493191719, 0.05036688223481178, 0.103775754570961, 0.02036934345960617, -0.005827389657497406, -0.08856192976236343, 0.013280008919537067, 0.03656306490302086, -0.03468478098511696, 0.036104876548051834, 0.03765236586332321, 0.03452884778380394, -0.03924112766981125, -0.012520849704742432, 0.012768102809786797, -0.03037974052131176, 0.028632180765271187, 0.048706792294979095, -0.01307850144803524, -0.0031555755995213985, -0.0066888402216136456, -0.04768821597099304, -0.037621013820171356, -0.03692038357257843, -0.0011512459022924304, -0.008696944452822208, 0.002917237114161253, 0.005093724932521582, 0.06444576382637024, -0.040197331458330154, -0.020323194563388824, 0.04352154582738876, -0.06340284645557404, 0.011102389544248581, -0.0030603196937590837, -0.02301941253244877, 0.010849319398403168, -0.04762796312570572, 0.0631827861070633, 0.003218876663595438, 0.0393446646630764, -0.027210773900151253, -0.04394930973649025, -0.04317058250308037, 0.05376942455768585, 0.03706185147166252, 0.05894319340586662, -0.0556054562330246, -0.0068563311360776424, 0.00392104871571064, -0.03049829788506031, 0.0095547866076231, 0.06179016828536987, 0.012316078878939152, 0.007524982560425997, 0.11298546195030212, 0.04947438836097717, -0.02512982487678528, -0.005441837944090366, -0.015857534483075142, 0.02010851539671421, 0.000008624324436823372, -0.004105404485017061, -0.0339554026722908, 0.093845896422863, 0.03784773498773575, -0.03486837074160576, -0.006637908518314362, -0.06569439172744751, 0.0778961107134819, 0.06872962415218353, -0.03764212504029274, -0.0005130090285092592, -0.027153583243489265, -0.009530287235975266, -0.06999596953392029, 0.04659024253487587, -0.0034248342271894217, 0.028075208887457848, 0.09007386863231659, -0.020474297925829887, 0.06352788209915161, 0.021848607808351517, 0.014788075350224972, -0.00039335680776275694, 0.02757658064365387, 0.040653955191373825, 0.029667198657989502, 0.04207024350762367, 0.04404091089963913, 0.04847021400928497, -0.012513886205852032, -0.023561991751194, 0.05582676827907562, 0.044751785695552826, 0.013749989680945873, 0.023255987092852592, -0.09830516576766968, 0.04369471222162247, -0.0012974818237125874, -0.0783805251121521, -0.0038462644442915916, 0.07053287327289581, 0.029120024293661118, 0.0030008882749825716, 0.07326390594244003, -0.01402974035590887, -0.007101910654455423, 0.046405769884586334, 0.01983606070280075, 0.07367497682571411, -0.07793717831373215, -0.011301475577056408, -0.023151619359850883, 0.008923766203224659, 0.04130277782678604, 0.06510395556688309, 0.03669895976781845, 0.07343544811010361, -0.05692271515727043, -0.046051327139139175, 0.0002064390282612294, -0.10671428591012955, 0.020452115684747696, 0.018297651782631874, 0.011609603650867939, -0.06819531321525574, -0.057356130331754684, -0.06533502042293549, 0.04316001757979393, -0.004693765193223953, 0.03407829999923706, -0.023960931226611137, -0.029776833951473236, 0.0723918229341507, -0.04464232549071312, 0.0727013349533081, 0.026724044233560562, 0.043470099568367004, -0.006198048125952482, 0.014875692315399647, -0.0351022332906723, 0.028897998854517937, 0.06242276355624199, 0.004770057275891304, -0.017820537090301514, 0.05086192861199379, -0.032644785940647125, -0.011146636679768562, 0.10860063880681992, -0.02172284573316574, -0.08260565251111984, 0.0052221594378352165, -0.013085311278700829, 0.03194450959563255, -0.004659777041524649, 0.04866969957947731, -0.048795126378536224, 0.03906514123082161, 0.006386170629411936, -0.022889690473675728, -0.054820504039525986, 0.030735580250620842, -0.06512047350406647, 0.031556159257888794, -0.0360725075006485, -0.038505811244249344, -0.014963474124670029, 0.05134258046746254, -0.04306556656956673, -0.021186022087931633, 0.042047321796417236, -0.04122283309698105, 0.06254295259714127, 0.026322951540350914, 0.07550080865621567, -0.08807441592216492, -0.015313051640987396, -0.10228808224201202, -0.03928147628903389, -0.0143620939925313, -0.02451987750828266, 0.04941469803452492, -0.012584525160491467, 0.07995390146970
t.Logf("Pattern magnitude: %f", e.Magnitude())
t.Logf("Pattern blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Electronics", func(t *testing.T) {
e := Embedding{-0.05180594325065613, 0.01302467193454504, -0.07439137995243073, 0.01689394749701023, 0.046378243714571, -0.0035438418854027987, 0.024782972410321236, 0.023577792569994926, 0.01646239310503006, -0.031226782128214836, -0.05440431833267212, 0.017289984971284866, -0.006996323354542255, -0.012644285336136818, 0.02970864810049534, 0.005355889443308115, 0.024662962183356285, 0.022619877010583878, 0.00677128043025732, -0.0563448965549469, -0.033471789211034775, -0.019071387127041817, 0.04766428470611572, 0.0010598651133477688, 0.02365567535161972, 0.01632094942033291, 0.006392440292984247, -0.09598034620285034, 0.009465769864618778, 0.04207403212785721, 0.03189894184470177, 0.017963960766792297, -0.030769845470786095, 0.005919745657593012, -0.08770479261875153, 0.012714629992842674, 0.018193846568465233, -0.035021308809518814, -0.0795571357011795, 0.06892108917236328, -0.017820099368691444, -0.02384634129703045, -0.0365188829600811, 0.08479302376508713, 0.012964854948222637, -0.03928542882204056, 0.04832274839282036, 0.12865662574768066, -0.0816672295331955, -0.03952854126691818, -0.022673537954688072, 0.07557689398527145, 0.10173349827528, -0.010405024513602257, -0.04927223175764084, 0.01974380575120449, 0.008235722780227661, 0.017481587827205658, -0.01310359314084053, -0.0641673281788826, -0.028081148862838745, 0.0027981651946902275, -0.030826350674033165, -0.058992281556129456, -0.025945695117115974, -0.009842520579695702, -0.1238027885556221, 0.04512490704655647, -0.05900980159640312, -0.011930370703339577, -0.01300117652863264, -0.012221364304423332, -0.002707510255277157, -0.06190686672925949, 0.04038376733660698, -0.022909319028258324, -0.029352504760026932, -0.0540381520986557, -0.04112442210316658, 0.0064831264317035675, -0.03242725506424904, -0.023029552772641182, -0.030570300295948982, 0.013785070739686489, -0.05163908377289772, -0.0179290771484375, -0.0646447017788887, 0.04891568049788475, -0.007749652490019798, -0.028875740244984627, 0.04430017247796059, 0.027526916936039925, 0.019241519272327423, -0.024648431688547134, 0.0812106728553772, -0.03707742318511009, -0.03149355202913284, -0.00023601599968969822, -0.029086312279105186, 0.04876125603914261, 0.034574247896671295, 0.007664257660508156, -0.004088438581675291, -0.03517894446849823, 0.02142981067299843, 0.03498981148004532, -0.04442032426595688, -0.0006218565977178514, 0.0227154903113842, -0.03919721394777298, 0.08658835291862488, 0.03793962672352791, -0.0690024122595787, -0.0228273905813694, 0.018410200253129005, 0.04332093149423599, -0.0029723148327320814, -0.03611557558178902, -0.07819456607103348, -0.020874394103884697, 0.022585326805710793, 0.008658535778522491, 0.060833849012851715, 0.04880820959806442, -0.010970346629619598, -0.047218549996614456, -0.009169485419988632, 0.016148699447512627, 0.06569914519786835, -0.031056180596351624, 0.012423882260918617, 0.004013547673821449, 0.08153069019317627, -0.020242849364876747, -0.013415863737463951, 0.036823153495788574, 0.018174750730395317, -0.05040120333433151, 0.012401800602674484, -0.01765509322285652, -0.09310948103666306, -0.013187769800424576, -0.07987909018993378, 0.015538031235337257, 0.12570154666900635, 0.0066225165501236916, 0.068520687520504, -0.0481201708316803, 0.03568735718727112, -0.023389358073472977, -0.023147553205490112, 0.011329473927617073, 0.021330680698156357, -0.03099925071001053, 0.05694403871893883, 0.013504046946763992, 0.047362618148326874, 0.030964717268943787, 0.09412779659032822, -0.007972204126417637, 0.058867715299129486, 0.008109568618237972, 0.012990031391382217, 0.018037034198641777, 0.018528752028942108, 0.04395899549126625, -0.08396230638027191, 0.0837755799293518, -0.07191102206707001, -0.05851449444890022, 0.05882364884018898, -0.04771038517355919, 0.04792647436261177, 0.05845404788851738, -0.03249375894665718, 0.008758701384067535, -0.03802226483821869, -0.054065950214862823, -0.04730144515633583, 0.0547344796359539, -0.012503416277468204, 0.0056467424146831036, -0.033631227910518646, -0.0254448801279068, 0.053906846791505814, 0.02265803888440132,
t.Logf("Electronics magnitude: %f", e.Magnitude())
t.Logf("Electronics blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Noise", func(t *testing.T) {
e := Embedding{-0.028413644060492516, 0.014786642044782639, -0.00007781313615851104, 0.1010037213563919, -0.04993607476353645, 0.06978536397218704, -0.06021164730191231, -0.042146824300289154, -0.035856474190950394, -0.043905649334192276, 0.010542239993810654, 0.02672266587615013, 0.02182694710791111, -0.02880868874490261, -0.0033185447100549936, -0.02615543082356453, 0.062338776886463165, 0.08039543032646179, -0.02352938801050186, -0.07403530180454254, -0.04744778200984001, 0.025475526228547096, 0.0256473571062088, 0.015856800600886345, -0.015151508152484894, 0.05426067113876343, -0.007554059382528067, 0.014762965962290764, -0.03517051413655281, 0.058827269822359085, -0.029669538140296936, 0.011925357393920422, 0.007475290913134813, -0.04272055998444557, -0.07233448326587677, 0.05908074975013733, 0.013562211766839027, -0.02179832011461258, -0.03163204714655876, 0.0590066984295845, 0.009199007414281368, 0.020500030368566513, 0.0012806614395231009, -0.0284284558147192, 0.03187696635723114, 0.0025364093016833067, 0.06829433143138885, 0.03231976553797722, -0.014477436430752277, -0.06564563512802124, -0.028539760038256645, 0.07953496277332306, 0.004884612280875444, 0.02638429030776024, -0.010754811577498913, 0.008101477287709713, 0.045937154442071915, 0.012718256562948227, 0.036548782140016556, -0.04473473131656647, 0.04400881007313728, 0.03326819837093353, -0.0045490562915802, -0.09080851823091507, 0.015577688813209534, 0.13730572164058685, 0.046803105622529984, 0.0069542014971375465, -0.019231807440519333, 0.06008884310722351, 0.08810017257928848, 0.07350029051303864, 0.017721252515912056, 0.02388271875679493, -0.0224995668977499, -0.02448461391031742, -0.09358938783407211, 0.038782332092523575, -0.04076448827981949, 0.00615560170263052, 0.03091275878250599, 0.0018259275238960981, 0.04202258959412575, 0.05872068554162979, -0.014363343827426434, 0.015467570163309574, -0.019165923818945885, 0.043171290308237076, -0.014050137251615524, -0.023240115493535995, 0.010015680454671383, 0.02434336580336094, -0.027894245460629463, 0.0263045784085989, 0.09273324906826019, 0.010157005861401558, -0.0029004134703427553, -0.019458729773759842, -0.011881384067237377, 0.0430494099855423, -0.028559086844325066, -0.0821596011519432, -0.0524628721177578, -0.031237857416272163, -0.009436956606805325, 0.060465652495622635, 0.0635918378829956, -0.05811920762062073, -0.07726399600505829, 0.013206791132688522, 0.004525348078459501, -0.002418376039713621, -0.06070084497332573, 0.017589464783668518, -0.024137431755661964, -0.04277845472097397, 0.010736255906522274, -0.03239559009671211, -0.037546440958976746, 0.005552142392843962, -0.059628404676914215, -0.04132899269461632, -0.009844700805842876, 0.024386689066886902, -0.04013141244649887, -0.052814923226833344, -0.04984592646360397, 0.07609694451093674, 0.022249160334467888, -0.07648488134145737, 0.0619162879884243, -0.05086202174425125, 0.016806233674287796, -0.006233078893274069, -0.06411013007164001, 0.028302324935793877, -0.021486226469278336, -0.028159718960523605, 0.004870292730629444, 0.03476119041442871, -0.025948315858840942, 0.00465776352211833, 0.016743451356887817, 0.017727363854646683, 0.032459959387779236, -0.054315079003572464, -0.0020411110017448664, -0.09286140650510788, -0.007291000802069902, 0.03185432031750679, 0.009363161399960518, -0.05573581904172897, -0.038047004491090775, 0.05292218178510666, 0.046576403081417084, -0.013785549439489841, 0.0915217399597168, -0.05915768817067146, -0.003472099080681801, -0.01682491973042488, 0.054596200585365295, 0.06438492983579636, -0.02698427066206932, 0.047645654529333115, -0.013871925882995129, 0.0056120469234883785, -0.04510403051972389, -0.03502017259597778, 0.021069763228297234, -0.03018837794661522, -0.09241854399442673, 0.05827372521162033, -0.028374068439006805, 0.012629379518330097, -0.04728636518120766, 0.018793949857354164, 0.0918879434466362, -0.004692704416811466, 0.02713858336210251, -0.022178176790475845, -0.030031373724341393, -0.06870366632938385, 0.018052516505122185, 0.0996708795428276, -0.0014522215351462364, 0.050628
t.Logf("Noise magnitude: %f", e.Magnitude())
assert.True(t, e.Blacklisted())
})
t.Run("Table", func(t *testing.T) {
e := Embedding{-0.021589165553450584, -0.04685473069548607, -0.03653239831328392, 0.09921359270811081, -0.033463504165410995, 0.015828609466552734, -0.07466079294681549, -0.007279849145561457, -0.0008846950950101018, 0.02164153940975666, 0.039402108639478683, 0.06595589965581894, -0.012385022826492786, -0.027386456727981567, 0.042002804577350616, -0.017668813467025757, 0.013556611724197865, 0.059105027467012405, 0.020291542634367943, 0.018905263394117355, -0.07945016026496887, 0.056240782141685486, 0.003986752592027187, -0.082450270652771, -0.0577380433678627, 0.008790938183665276, -0.02054051123559475, 0.02442559413611889, -0.0227860976010561, 0.009795891121029854, -0.035049185156822205, 0.04224361106753349, 0.0300704725086689, -0.024621469900012016, -0.07945629209280014, 0.009739790111780167, 0.02491810731589794, 0.008706964552402496, -0.002172251930460334, 0.03341079130768776, 0.013651988469064236, 0.013303282670676708, 0.010096142999827862, -0.03821680694818497, 0.01955227553844452, -0.016358619555830956, 0.06765712052583694, 0.010280216112732887, -0.03900022804737091, -0.03305138275027275, 0.025211848318576813, 0.05358365550637245, 0.013680046424269676, -0.0008027729927562177, -0.08227319270372391, -0.0028876576106995344, -0.04117295891046524, 0.12321393936872482, -0.01736162044107914, -0.06343534588813782, -0.013313072733581066, 0.07512281090021133, -0.07410137355327606, -0.05574270337820053, -0.017032019793987274, 0.1107853502035141, 0.028538815677165985, -0.04199889302253723, -0.035375479608774185, 0.03278984874486923, 0.07600616663694382, 0.07252155244350433, -0.007715845946222544, -0.009044633246958256, -0.029275542125105858, -0.04939345642924309, -0.04446575045585632, -0.01581619121134281, -0.05780661851167679, -0.022297438234090805, 0.04997215420007706, 0.06955426931381226, 0.008419277146458626, -0.026919016614556313, 0.03740996867418289, 0.023569636046886444, 0.010381177067756653, 0.05369122326374054, -0.09115616232156754, 0.059217724949121475, 0.04705702140927315, -0.010684452019631863, 0.04128545522689819, -0.03944771736860275, 0.033882513642311096, 0.050136953592300415, 0.08438227325677872, 0.041821856051683426, -0.05752246081829071, 0.018399879336357117, -0.012252287939190865, -0.036460407078266144, 0.014475136995315552, -0.038999248296022415, 0.0018727561691775918, -0.007863928563892841, 0.07946325093507767, -0.005779915489256382, -0.03330346196889877, 0.04451979696750641, 0.046568118035793304, -0.0347437784075737, -0.08650397509336472, 0.005427557043731213, -0.013447429053485394, 0.01087251864373684, 0.08186673372983932, 0.01233734656125307, 0.020150883123278618, 0.09651866555213928, -0.09818366169929504, -0.04016005992889404, -0.0024112944956868887, 0.024362700060009956, -0.030871255323290825, -0.05802598595619202, 0.038836970925331116, 0.02775968424975872, -0.07874374836683273, -0.11030562967061996, 0.022055234760046005, -0.06364589929580688, 0.07036200165748596, -0.029879840090870857, -0.08935156464576721, 0.03242754191160202, -0.014439196325838566, 0.0220960583537817, 0.05614573881030083, 0.04055033624172211, -0.017350755631923676, 0.027131175622344017, 0.005244737956672907, 0.1252637654542923, 0.04347527027130127, -0.027175569906830788, -0.03350072726607323, -0.008322399109601974, 0.026112832129001617, 0.038534071296453476, 0.045353326946496964, 0.015033332630991936, -0.046688780188560486, 0.010521644726395607, 0.08829093724489212, -0.011036528274416924, 0.07205603271722794, -0.002028469927608967, 0.02397444285452366, 0.022765319794416428, 0.07164853811264038, -0.0008233961998485029, -0.002320549450814724, 0.059182994067668915, 0.009708354249596596, -0.00671979459002614, -0.06414614617824554, -0.09810009598731995, 0.03798430785536766, 0.04144459590315819, -0.08087018877267838, 0.048061687499284744, -0.0375189334154129, -0.02903040684759617, -0.0440029613673687, -0.0008936659432947636, 0.06186728551983833, -0.014461840502917767, -0.004082171246409416, 0.001528706168755889, -0.054353758692741394, -0.06381633877754211, -0.031929001212120056, 0.09166610240936279, 0.00457199988886714, 0.043349206447
t.Logf("Table magnitude: %f", e.Magnitude())
t.Logf("Table blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Grill", func(t *testing.T) {
e := Embedding{-0.01837332546710968, -0.013573388569056988, -0.06768853217363358, 0.07513957470655441, -0.024594588205218315, 0.04866361990571022, -0.0223557036370039, 0.06777956336736679, -0.03355424106121063, 0.007214206270873547, 0.020838549360632896, 0.06315871328115463, 0.007955560460686684, -0.04978488013148308, -0.03457174450159073, -0.05756441876292229, 0.021101659163832664, 0.07351792603731155, 0.037004679441452026, -0.08092962950468063, -0.10090329498052597, 0.04342924803495407, 0.07541006058454514, -0.09794607758522034, -0.04336617887020111, 0.030530085787177086, 0.06687743961811066, -0.012134592048823833, -0.016766507178544998, 0.04169850051403046, -0.022724492475390434, 0.031140318140387535, 0.0304417721927166, -0.05157066136598587, -0.05721214413642883, 0.000007804320375726093, -0.015607557259500027, 0.04133500158786774, -0.05490269139409065, -0.04097500070929527, -0.07551655918359756, 0.018716955557465553, -0.002527209697291255, -0.024408608675003052, 0.03310471773147583, -0.050737414509058, 0.03021002933382988, 0.05805148184299469, -0.03748670965433121, -0.05660712718963623, -0.0603872649371624, 0.07678244262933731, 0.07810293138027191, -0.015639036893844604, -0.0976266860961914, 0.06810689717531204, -0.005614086054265499, 0.15125170350074768, -0.05728299915790558, 0.038004469126462936, -0.024654945358633995, -0.003890740917995572, 0.002573493868112564, -0.008778314106166363, -0.004702999722212553, 0.02146194502711296, -0.02527308277785778, -0.00032656369148753583, -0.011799085885286331, -0.007101763971149921, 0.022610392421483994, 0.048185817897319794, 0.0616774819791317, -0.045128002762794495, -0.01951797492802143, -0.06434294581413269, -0.05767672881484032, -0.05709012597799301, -0.011654190719127655, -0.027066649869084358, -0.03883373737335205, 0.010011427104473114, 0.07596040517091751, -0.026856714859604836, -0.03714124858379364, 0.014965778216719627, -0.042677007615566254, 0.019410759210586548, 0.006505198776721954, -0.00006856521940790117, -0.01570073515176773, 0.002915995428338647, -0.006686258129775524, -0.060209259390830994, 0.043758343905210495, 0.018303077667951584, 0.019022883847355843, -0.0027186169754713774, -0.09308966994285583, 0.01746193878352642, 0.005942555144429207, -0.05838776379823685, -0.0032717965077608824, 0.03753752261400223, 0.026200570166110992, 0.01961083523929119, 0.02666139230132103, -0.0012007004115730524, 0.0305663850158453, -0.05417969077825546, 0.03453692048788071, 0.04456380009651184, -0.07075267285108566, -0.03196420148015022, 0.0186473298817873, 0.025048403069376945, 0.034589216113090515, 0.05342273786664009, 0.04453473538160324, 0.032101619988679886, -0.04870849475264549, -0.08165700733661652, 0.05021516606211662, -0.013717597350478172, -0.06963597983121872, -0.0408187061548233, -0.015300817787647247, 0.05891439691185951, -0.03214791789650917, -0.0960891842842102, -0.010289954021573067, -0.0352291576564312, 0.07732859998941422, -0.03038274124264717, -0.07570908963680267, 0.05781133472919464, -0.05557519569993019, 0.03916268050670624, 0.031007817015051842, 0.04387404024600983, -0.05009175464510918, 0.041141826659440994, -0.04713473469018936, 0.02678399346768856, -0.025202425196766853, 0.00961983297020197, 0.0056135463528335094, -0.04324018210172653, 0.025789376348257065, 0.11923738569021225, 0.04898366332054138, 0.032321009784936905, -0.028951527550816536, 0.01557802502065897, 0.061684560030698776, 0.0565095916390419, 0.023945540189743042, -0.018223587423563004, 0.034053049981594086, -0.01928810402750969, 0.06278964132070541, 0.054570410400629044, -0.012285502627491951, -0.005429449491202831, 0.004575666971504688, -0.03712894394993782, -0.01709163561463356, -0.026084251701831818, -0.03786347806453705, 0.09257770329713821, -0.01701647974550724, 0.013358280062675476, -0.02419424057006836, -0.017860550433397293, -0.049975886940956116, -0.00546486908569932, -0.0031186616979539394, -0.04331083223223686, 0.007076986134052277, -0.003979419358074665, -0.04064244404435158, 0.03149298578500748, 0.010591072030365467, 0.057948868721723557, 0.04654596373438835, -0.004353404976
t.Logf("Grill magnitude: %f", e.Magnitude())
t.Logf("Grill blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Flower1", func(t *testing.T) {
e := Embedding{-0.03019552491605282, -0.07871674001216888, -0.023003704845905304, 0.09487959742546082, -0.017495226114988327, -0.008054818026721478, -0.0647301971912384, 0.013870361261069775, 0.0009670352446846664, -0.05396779254078865, 0.02548447623848915, 0.057007644325494766, 0.011709821410477161, 0.0038011909928172827, 0.045353058725595474, 0.035295017063617706, 0.04017356410622597, 0.043185487389564514, 0.027515195310115814, -0.020289737731218338, -0.039764322340488434, 0.005229332484304905, 0.00405721552670002, 0.000556905462872237, -0.021460331976413727, 0.00335355824790895, -0.0321849025785923, 0.055887673050165176, -0.004678008612245321, 0.1182812973856926, -0.07219913601875305, -0.05155760794878006, 0.00901042390614748, -0.06545215845108032, -0.07447744160890579, 0.03930509090423584, -0.057567134499549866, 0.05046992003917694, -0.0440463088452816, 0.05263185501098633, 0.0002704291546251625, 0.02582591585814953, 0.011618443764746189, -0.02601690962910652, 0.02271551638841629, 0.027715599164366722, 0.07251789420843124, 0.04268983379006386, -0.06031318008899689, 0.00862133502960205, 0.03970063105225563, 0.0518559105694294, 0.023329779505729675, -0.002031347481533885, -0.07488734275102615, 0.009001128375530243, -0.010369407013058662, 0.11085769534111023, 0.016241254284977913, -0.00002152912929886952, -0.02413908764719963, 0.008454854600131512, -0.011496080085635185, -0.04082289710640907, -0.031190361827611923, 0.1388476938009262, 0.008612303994596004, -0.023153211921453476, -0.043824996799230576, 0.024006437510252, 0.0481027252972126, 0.08680301159620285, 0.04270326346158981, -0.05216927453875542, -0.05927334353327751, -0.019374316558241844, -0.025229861959815025, -0.008222969248890877, -0.002543332986533642, 0.05790124833583832, 0.049608856439590454, 0.012818481773138046, 0.053785353899002075, 0.042208995670080185, 0.05840647593140602, -0.0249145720154047, 0.013419240713119507, 0.07815870642662048, -0.0288663599640131, 0.031133931130170822, 0.04570338502526283, 0.021969476714730263, 0.037383776158094406, -0.021146640181541443, 0.0657959058880806, -0.038604237139225006, 0.04351291060447693, 0.024784596636891365, -0.01146020833402872, 0.019733143970370293, -0.0026928819715976715, -0.05324970930814743, -0.0024495902471244335, 0.06615212559700012, 0.05224823206663132, 0.03705878555774689, 0.08077745884656906, 0.044284820556640625, 0.04056631401181221, 0.03569989278912544, -0.029091807082295418, 0.023202665150165558, -0.06368359178304672, -0.030634507536888123, -0.017721401527523994, -0.056922271847724915, 0.03359384834766388, -0.004456135910004377, -0.02138909325003624, 0.01833347976207733, -0.03810671344399452, -0.01576179824769497, -0.030147895216941833, -0.061343636363744736, 0.02187352068722248, -0.027865473181009293, -0.02818996086716652, 0.06268241256475449, -0.01986093446612358, -0.05663265287876129, 0.011026914231479168, -0.028170641511678696, 0.07949692010879517, 0.00592046370729804, -0.07582945376634598, 0.043210942298173904, -0.011235090903937817, 0.08058775216341019, 0.06084113568067551, 0.06698691099882126, 0.02548559196293354, 0.007087444420903921, 0.01572406105697155, 0.06709838658571243, 0.05799484625458717, -0.030445881187915802, -0.029201997444033623, -0.0296348724514246, -0.021554311737418175, 0.038257673382759094, 0.05144689977169037, -0.04842280596494675, -0.025446686893701553, 0.03977954387664795, 0.0036737604532390833, -0.06959599256515503, 0.06593459844589233, -0.019823838025331497, -0.02825123816728592, 0.0337490513920784, 0.04951351881027222, -0.036692652851343155, -0.012616735883057117, 0.06784524023532867, 0.03620803728699684, 0.007500113919377327, -0.037119060754776, -0.08364656567573547, -0.020971693098545074, -0.020525673404335976, -0.028083818033337593, 0.019949382171034813, -0.006462384015321732, -0.026246046647429466, -0.0034215052146464586, 0.02823772467672825, 0.11498260498046875, -0.06337784230709076, 0.005141086410731077, -0.027393296360969543, -0.07954125851392746, -0.04435193911194801, -0.04914383217692375, 0.059515394270420074, -0.03866855800151825, 0.04542951658368111, 0.01
t.Logf("Flower1 magnitude: %f", e.Magnitude())
t.Logf("Flower1 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Flower2", func(t *testing.T) {
e := Embedding{-0.05463063716888428, -0.03371426463127136, -0.0407349094748497, 0.05211907997727394, -0.0207980964332819, -0.026475567370653152, -0.004256931599229574, 0.009527092799544334, -0.0018235337920486927, -0.021133283153176308, 0.0652984082698822, 0.06004940718412399, 0.053581975400447845, 0.054923877120018005, 0.011446550488471985, -0.009651191532611847, -0.019915800541639328, 0.06117098033428192, -0.027432965114712715, 0.021548239514231682, -0.0759635642170906, 0.025930799543857574, 0.07706271857023239, -0.12473610043525696, -0.05552073195576668, -0.02323354408144951, 0.04534662142395973, -0.03784395009279251, -0.012352552264928818, -0.022830061614513397, 0.055954743176698685, 0.06220647320151329, 0.01621929556131363, 0.03211347386240959, -0.09252569079399109, -0.023571643978357315, -0.006070449482649565, 0.02719615213572979, -0.0394582636654377, 0.012589468620717525, -0.05825604125857353, -0.04322190210223198, 0.02713274396955967, 0.05877536162734032, 0.06345852464437485, -0.04119482636451721, 0.06242511421442032, 0.032530974596738815, -0.042238738387823105, -0.05084029957652092, -0.06455250084400177, 0.06907129287719727, 0.058659400790929794, -0.018500279635190964, -0.09088067710399628, 0.0029079692903906107, -0.030330153182148933, 0.04387861117720604, -0.05019963160157204, -0.002478249603882432, -0.014510122127830982, -0.00786376278847456, -0.0010800185846164823, -0.007502203807234764, 0.025499310344457626, 0.06315060704946518, -0.06748983263969421, -0.048920661211013794, -0.04095924645662308, -0.019630206748843193, 0.02626034803688526, -0.015071701258420944, 0.10041424632072449, -0.03800126910209656, -0.05575624853372574, -0.02125774323940277, 0.02796982042491436, -0.1026664599776268, -0.06748276948928833, -0.03743085265159607, -0.03552986681461334, 0.06065348908305168, 0.013063639402389526, -0.014365208335220814, -0.003555967705324292, 0.017303358763456345, -0.024060532450675964, 0.026340745389461517, -0.061510276049375534, -0.0046484931372106075, -0.006447231397032738, 0.01401460263878107, 0.011501336470246315, -0.07818710803985596, 0.02511146478354931, -0.002745403442531824, -0.029339004307985306, 0.015656275674700737, -0.029391447082161903, -0.020258497446775436, 0.0009495576960034668, 0.04092829301953316, 0.046933650970458984, 0.014906227588653564, -0.01311752200126648, 0.026448165997862816, 0.016317075118422508, -0.00741860456764698, -0.06228558346629143, -0.02560289204120636, -0.017271775752305984, 0.00003627142359619029, -0.06505917757749557, 0.02352156862616539, -0.010600448586046696, 0.001862041070125997, -0.027565129101276398, 0.07768595218658447, 0.005964277777820826, -0.024083254858851433, -0.026283763349056244, -0.04580988734960556, 0.04992192983627319, 0.0627615824341774, -0.10283318907022476, -0.07365758717060089, -0.04208321124315262, 0.04309738054871559, 0.037950318306684494, -0.10438454896211624, 0.024002524092793465, -0.04175486043095589, 0.046325746923685074, 0.02582639269530773, -0.01837374083697796, 0.01956857368350029, -0.04356582090258598, -0.06355538964271545, -0.023530298843979836, 0.006199323106557131, -0.023792369291186333, 0.0762750506401062, -0.07612712681293488, 0.018534565344452858, 0.014370683580636978, 0.04271596297621727, -0.016677238047122955, -0.03894709795713425, 0.03537117317318916, 0.08931876718997955, 0.019467126578092575, 0.05926606059074402, -0.04106913506984711, 0.03679004684090614, 0.041339896619319916, 0.0073695615865290165, 0.01521733682602644, -0.06132401525974274, 0.013890499249100685, -0.033076632767915726, 0.03764314204454422, 0.08146361261606216, 0.056604549288749695, 0.010546108707785606, 0.020975487306714058, -0.06503409147262573, -0.06469660997390747, -0.008601412177085876, 0.010800623334944248, -0.021312901750206947, -0.04689965397119522, 0.05380029231309891, -0.0316980704665184, -0.005872285459190607, -0.08645015954971313, -0.058882374316453934, -0.03977329283952713, -0.03215678408741951, 0.024742668494582176, 0.06970592588186264, 0.007632080931216478, 0.050259385257959366, -0.01501927338540554, 0.016141297295689583, 0.026386799290776253, -0.0074
t.Logf("Flower2 magnitude: %f", e.Magnitude())
t.Logf("Flower2 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Dots1", func(t *testing.T) {
e := Embedding{-0.08115676790475845, -0.05963730812072754, 0.0788436010479927, 0.04450595751404762, 0.06169874966144562, -0.015032034367322922, -0.0899500921368599, -0.009825228713452816, 0.0564420260488987, -0.006098559126257896, 0.025342704728245735, 0.06437194347381592, 0.040096595883369446, 0.006068151444196701, -0.022622305899858475, 0.03228282183408737, 0.02473197504878044, 0.07248376309871674, 0.008801424875855446, -0.03229149803519249, -0.0017382852965965867, 0.007214698474854231, 0.05117001757025719, -0.009290488436818123, -0.03940087929368019, 0.0213032029569149, -0.04150773957371712, 0.01231461763381958, -0.003015191527083516, 0.05852336809039116, -0.09817866235971451, -0.04224725812673569, 0.0015780223766341805, -0.09480146318674088, 0.0027741806115955114, 0.02010342665016651, -0.04425966739654541, -0.040346600115299225, -0.10663139820098877, 0.059161096811294556, 0.0040780920535326, 0.013586863875389099, -0.0005677796434611082, 0.023130279034376144, -0.03124443255364895, 0.04197738692164421, 0.06594746559858322, 0.06783415377140045, -0.09719463437795639, -0.010987519286572933, -0.0023087908048182726, 0.001773863798007369, 0.04488230496644974, 0.08580370247364044, 0.03434797376394272, 0.004936364945024252, 0.03639600798487663, 0.06204204261302948, -0.019927602261304855, -0.02692924067378044, 0.017000118270516396, -0.02604246325790882, -0.026507725939154625, 0.016996048390865326, -0.04385655000805855, 0.0884787067770958, -0.042860180139541626, 0.009798342362046242, -0.0063103619031608105, 0.015574026852846146, 0.06514336913824081, 0.019630873575806618, 0.06744594871997833, -0.04516621306538582, -0.05032436549663544, 0.020592208951711655, -0.02518467791378498, 0.04013744741678238, 0.013429186306893826, 0.03592214733362198, 0.06909503042697906, -0.02468045987188816, 0.04889506846666336, 0.03668493032455444, 0.0026139242108911276, 0.02689972333610058, -0.01203525997698307, 0.07506909966468811, 0.03239822760224342, 0.02902725152671337, 0.03790690377354622, 0.08072637021541595, 0.04927707090973854, 0.04923266917467117, 0.015510630793869495, 0.008611151948571205, -0.025840433314442635, 0.056794196367263794, 0.0004704083257820457, 0.02275877259671688, -0.01372733898460865, -0.055375292897224426, -0.024181945249438286, 0.0737459659576416, 0.04204948991537094, 0.028205251321196556, 0.0642118975520134, -0.02637362666428089, -0.011575883254408836, 0.02578408271074295, -0.05103129893541336, 0.0613427571952343, -0.07809718698263168, 0.026064777746796608, -0.0522201806306839, -0.0064789350144565105, 0.008620581589639187, 0.060150034725666046, -0.03483464941382408, -0.005583859048783779, 0.04235440492630005, -0.09111455827951431, -0.03303370252251625, -0.04741404578089714, 0.07915093749761581, 0.01825057528913021, -0.016481375321745872, 0.04156731069087982, -0.015531884506344795, -0.04502810537815094, 0.00981069914996624, -0.00807663518935442, 0.03779071196913719, -0.0004603196575772017, -0.023713205009698868, 0.06177502125501633, -0.04528318718075752, 0.014600848779082298, -0.010573716834187508, 0.01635739952325821, -0.06683669239282608, -0.0051379119977355, -0.017422694712877274, 0.03677544742822647, 0.013474640436470509, -0.019268950447440147, 0.011770953424274921, -0.0076083713211119175, -0.023129886016249657, 0.00902184471487999, 0.04812190681695938, -0.05269356817007065, -0.052405595779418945, 0.06389874964952469, -0.006590772420167923, -0.04771706089377403, -0.01384259294718504, 0.006632381584495306, -0.05110255628824234, 0.022211385890841484, 0.03172893077135086, -0.032283324748277664, -0.061732541769742966, 0.059450216591358185, 0.014081389643251896, -0.0018659111810848117, -0.02636120468378067, -0.04969250038266182, -0.011741330847144127, -0.01514124870300293, -0.036745455116033554, -0.07577916234731674, -0.03361281007528305, -0.003115437924861908, -0.04262397065758705, 0.007837039418518543, 0.0884321928024292, 0.012420982122421265, -0.058416612446308136, -0.04640566185116768, -0.030523240566253662, 0.013329975306987762, -0.032670460641384125, 0.04908979684114456, 0.0016104059759527445, 0.0267822053283453, 0.004
t.Logf("Dots1 magnitude: %f", e.Magnitude())
t.Logf("Dots1 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Dots2", func(t *testing.T) {
e := Embedding{-0.04752028360962868, -0.07564439624547958, 0.06620408594608307, 0.07881300151348114, -0.010296037420630455, -0.04715193063020706, -0.08304407447576523, -0.0632619857788086, 0.006681173574179411, -0.08067381381988525, 0.028126709163188934, 0.0300692580640316, 0.027543583884835243, 0.027835704386234283, 0.02536364272236824, 0.06358302384614944, 0.04477228224277496, 0.09044454246759415, 0.0025768436025828123, 0.03368930146098137, 0.03108157590031624, 0.0034471654798835516, 0.006852663122117519, 0.009569973684847355, -0.032888468354940414, 0.007848908193409443, -0.02188052423298359, 0.01723313331604004, 0.02685108594596386, 0.07939361780881882, -0.04558749124407768, -0.02980669029057026, -0.018962625414133072, -0.052443426102399826, -0.06572094559669495, 0.008843130432069302, -0.05589630827307701, -0.005741346627473831, -0.025694040581583977, 0.08558199554681778, -0.011519107967615128, -0.006611749529838562, -0.024117479100823402, 0.020807920023798943, -0.005759728141129017, 0.011532783508300781, 0.08728612214326859, 0.037037864327430725, -0.04939253255724907, 0.053707193583250046, -0.00677343038842082, 0.05087637901306152, 0.03341832384467125, 0.06772391498088837, 0.014028037898242474, -0.03710141032934189, 0.05773237347602844, 0.013821864500641823, 0.017365241423249245, -0.006683145184069872, 0.032184142619371414, -0.014333033934235573, 0.02211962267756462, 0.01040064450353384, 0.008106250315904617, 0.1458284556865692, -0.029970917850732803, 0.010591461323201656, -0.05175281688570976, -0.019290633499622345, 0.03726418688893318, 0.05601935461163521, 0.07777519524097443, -0.010739256627857685, -0.0902026817202568, 0.030603161081671715, -0.0206608846783638, 0.005280520301312208, -0.01667620800435543, -0.002639653393998742, 0.05487610027194023, -0.043772317469120026, 0.027496369555592537, 0.07613971084356308, 0.03990131989121437, -0.04181038960814476, -0.0004919982748106122, 0.07768265157938004, 0.00032098483643494546, 0.031321946531534195, 0.06626664102077484, 0.060554686933755875, 0.0007006273954175413, 0.06040005758404732, 0.03150910884141922, -0.04204067587852478, -0.03609658032655716, 0.004612777382135391, -0.011249862611293793, -0.0014120896812528372, -0.008355832658708096, -0.04924174025654793, -0.01868174411356449, 0.036391619592905045, 0.05487244948744774, 0.02007218636572361, 0.05740034952759743, -0.012519082985818386, -0.04054625332355499, 0.04215769097208977, -0.04693460091948509, 0.0420171320438385, -0.06132034212350845, 0.06114023178815842, -0.05180251598358154, -0.04847567155957222, -0.0528692901134491, 0.022387083619832993, -0.04536806792020798, -0.02002035826444626, 0.031009504571557045, -0.043465755879879, -0.012002941220998764, -0.017938774079084396, 0.02036328800022602, 0.016838226467370987, -0.04751292243599892, 0.033071935176849365, 0.04301192983984947, -0.02976381406188011, 0.043087560683488846, -0.010051952674984932, 0.0000864430476212874, 0.01179417036473751, -0.021177852526307106, 0.03144577145576477, -0.05137062817811966, 0.009149949066340923, -0.016788091510534286, 0.015786245465278625, -0.018203238025307655, 0.020216401666402817, -0.016213763505220413, -0.00022753850498702377, 0.028512977063655853, -0.019117331132292747, 0.01792442426085472, -0.05919519439339638, -0.026117796078324318, 0.015188477002084255, 0.0418018214404583, -0.03122447244822979, -0.028978154063224792, 0.013010965660214424, 0.0037310197949409485, -0.03488035500049591, 0.02937684766948223, -0.015035790391266346, -0.04733068495988846, 0.03993461653590202, 0.0005705818184651434, -0.04286117106676102, -0.015688391402363777, 0.059625044465065, -0.0025964081287384033, -0.0009035039693117142, -0.04421289637684822, -0.02616998367011547, 0.009143768809735775, -0.10795585066080093, -0.05594909191131592, -0.025725699961185455, 0.0018580693285912275, -0.009901541285216808, -0.031974468380212784, -0.007890747860074043, 0.049082737416028976, -0.022871194407343864, 0.028161806985735893, -0.00343366339802742, -0.03733258694410324, -0.023921160027384758, -0.02917514741420746, 0.008737168274819851, -0.05744306370615959, 0.039650
t.Logf("Dots2 magnitude: %f", e.Magnitude())
t.Logf("Dots2 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
/*
p, r, _ := EmbeddingsMidpoint(Embeddings{
Embedding{-0.04752028360962868, -0.07564439624547958, 0.06620408594608307, 0.07881300151348114, -0.010296037420630455, -0.04715193063020706, -0.08304407447576523, -0.0632619857788086, 0.006681173574179411, -0.08067381381988525, 0.028126709163188934, 0.0300692580640316, 0.027543583884835243, 0.027835704386234283, 0.02536364272236824, 0.06358302384614944, 0.04477228224277496, 0.09044454246759415, 0.0025768436025828123, 0.03368930146098137, 0.03108157590031624, 0.0034471654798835516, 0.006852663122117519, 0.009569973684847355, -0.032888468354940414, 0.007848908193409443, -0.02188052423298359, 0.01723313331604004, 0.02685108594596386, 0.07939361780881882, -0.04558749124407768, -0.02980669029057026, -0.018962625414133072, -0.052443426102399826, -0.06572094559669495, 0.008843130432069302, -0.05589630827307701, -0.005741346627473831, -0.025694040581583977, 0.08558199554681778, -0.011519107967615128, -0.006611749529838562, -0.024117479100823402, 0.020807920023798943, -0.005759728141129017, 0.011532783508300781, 0.08728612214326859, 0.037037864327430725, -0.04939253255724907, 0.053707193583250046, -0.00677343038842082, 0.05087637901306152, 0.03341832384467125, 0.06772391498088837, 0.014028037898242474, -0.03710141032934189, 0.05773237347602844, 0.013821864500641823, 0.017365241423249245, -0.006683145184069872, 0.032184142619371414, -0.014333033934235573, 0.02211962267756462, 0.01040064450353384, 0.008106250315904617, 0.1458284556865692, -0.029970917850732803, 0.010591461323201656, -0.05175281688570976, -0.019290633499622345, 0.03726418688893318, 0.05601935461163521, 0.07777519524097443, -0.010739256627857685, -0.0902026817202568, 0.030603161081671715, -0.0206608846783638, 0.005280520301312208, -0.01667620800435543, -0.002639653393998742, 0.05487610027194023, -0.043772317469120026, 0.027496369555592537, 0.07613971084356308, 0.03990131989121437, -0.04181038960814476, -0.0004919982748106122, 0.07768265157938004, 0.00032098483643494546, 0.031321946531534195, 0.06626664102077484, 0.060554686933755875, 0.0007006273954175413, 0.06040005758404732, 0.03150910884141922, -0.04204067587852478, -0.03609658032655716, 0.004612777382135391, -0.011249862611293793, -0.0014120896812528372, -0.008355832658708096, -0.04924174025654793, -0.01868174411356449, 0.036391619592905045, 0.05487244948744774, 0.02007218636572361, 0.05740034952759743, -0.012519082985818386, -0.04054625332355499, 0.04215769097208977, -0.04693460091948509, 0.0420171320438385, -0.06132034212350845, 0.06114023178815842, -0.05180251598358154, -0.04847567155957222, -0.0528692901134491, 0.022387083619832993, -0.04536806792020798, -0.02002035826444626, 0.031009504571557045, -0.043465755879879, -0.012002941220998764, -0.017938774079084396, 0.02036328800022602, 0.016838226467370987, -0.04751292243599892, 0.033071935176849365, 0.04301192983984947, -0.02976381406188011, 0.043087560683488846, -0.010051952674984932, 0.0000864430476212874, 0.01179417036473751, -0.021177852526307106, 0.03144577145576477, -0.05137062817811966, 0.009149949066340923, -0.016788091510534286, 0.015786245465278625, -0.018203238025307655, 0.020216401666402817, -0.016213763505220413, -0.00022753850498702377, 0.028512977063655853, -0.019117331132292747, 0.01792442426085472, -0.05919519439339638, -0.026117796078324318, 0.015188477002084255, 0.0418018214404583, -0.03122447244822979, -0.028978154063224792, 0.013010965660214424, 0.0037310197949409485, -0.03488035500049591, 0.02937684766948223, -0.015035790391266346, -0.04733068495988846, 0.03993461653590202, 0.0005705818184651434, -0.04286117106676102, -0.015688391402363777, 0.059625044465065, -0.0025964081287384033, -0.0009035039693117142, -0.04421289637684822, -0.02616998367011547, 0.009143768809735775, -0.10795585066080093, -0.05594909191131592, -0.025725699961185455, 0.0018580693285912275, -0.009901541285216808, -0.031974468380212784, -0.007890747860074043, 0.049082737416028976, -0.022871194407343864, 0.028161806985735893, -0.00343366339802742, -0.03733258694410324, -0.023921160027384758, -0.02917514741420746, 0.008737168274819851, -0.05744306370615959, 0.039650738
Embedding{-0.08115676790475845, -0.05963730812072754, 0.0788436010479927, 0.04450595751404762, 0.06169874966144562, -0.015032034367322922, -0.0899500921368599, -0.009825228713452816, 0.0564420260488987, -0.006098559126257896, 0.025342704728245735, 0.06437194347381592, 0.040096595883369446, 0.006068151444196701, -0.022622305899858475, 0.03228282183408737, 0.02473197504878044, 0.07248376309871674, 0.008801424875855446, -0.03229149803519249, -0.0017382852965965867, 0.007214698474854231, 0.05117001757025719, -0.009290488436818123, -0.03940087929368019, 0.0213032029569149, -0.04150773957371712, 0.01231461763381958, -0.003015191527083516, 0.05852336809039116, -0.09817866235971451, -0.04224725812673569, 0.0015780223766341805, -0.09480146318674088, 0.0027741806115955114, 0.02010342665016651, -0.04425966739654541, -0.040346600115299225, -0.10663139820098877, 0.059161096811294556, 0.0040780920535326, 0.013586863875389099, -0.0005677796434611082, 0.023130279034376144, -0.03124443255364895, 0.04197738692164421, 0.06594746559858322, 0.06783415377140045, -0.09719463437795639, -0.010987519286572933, -0.0023087908048182726, 0.001773863798007369, 0.04488230496644974, 0.08580370247364044, 0.03434797376394272, 0.004936364945024252, 0.03639600798487663, 0.06204204261302948, -0.019927602261304855, -0.02692924067378044, 0.017000118270516396, -0.02604246325790882, -0.026507725939154625, 0.016996048390865326, -0.04385655000805855, 0.0884787067770958, -0.042860180139541626, 0.009798342362046242, -0.0063103619031608105, 0.015574026852846146, 0.06514336913824081, 0.019630873575806618, 0.06744594871997833, -0.04516621306538582, -0.05032436549663544, 0.020592208951711655, -0.02518467791378498, 0.04013744741678238, 0.013429186306893826, 0.03592214733362198, 0.06909503042697906, -0.02468045987188816, 0.04889506846666336, 0.03668493032455444, 0.0026139242108911276, 0.02689972333610058, -0.01203525997698307, 0.07506909966468811, 0.03239822760224342, 0.02902725152671337, 0.03790690377354622, 0.08072637021541595, 0.04927707090973854, 0.04923266917467117, 0.015510630793869495, 0.008611151948571205, -0.025840433314442635, 0.056794196367263794, 0.0004704083257820457, 0.02275877259671688, -0.01372733898460865, -0.055375292897224426, -0.024181945249438286, 0.0737459659576416, 0.04204948991537094, 0.028205251321196556, 0.0642118975520134, -0.02637362666428089, -0.011575883254408836, 0.02578408271074295, -0.05103129893541336, 0.0613427571952343, -0.07809718698263168, 0.026064777746796608, -0.0522201806306839, -0.0064789350144565105, 0.008620581589639187, 0.060150034725666046, -0.03483464941382408, -0.005583859048783779, 0.04235440492630005, -0.09111455827951431, -0.03303370252251625, -0.04741404578089714, 0.07915093749761581, 0.01825057528913021, -0.016481375321745872, 0.04156731069087982, -0.015531884506344795, -0.04502810537815094, 0.00981069914996624, -0.00807663518935442, 0.03779071196913719, -0.0004603196575772017, -0.023713205009698868, 0.06177502125501633, -0.04528318718075752, 0.014600848779082298, -0.010573716834187508, 0.01635739952325821, -0.06683669239282608, -0.0051379119977355, -0.017422694712877274, 0.03677544742822647, 0.013474640436470509, -0.019268950447440147, 0.011770953424274921, -0.0076083713211119175, -0.023129886016249657, 0.00902184471487999, 0.04812190681695938, -0.05269356817007065, -0.052405595779418945, 0.06389874964952469, -0.006590772420167923, -0.04771706089377403, -0.01384259294718504, 0.006632381584495306, -0.05110255628824234, 0.022211385890841484, 0.03172893077135086, -0.032283324748277664, -0.061732541769742966, 0.059450216591358185, 0.014081389643251896, -0.0018659111810848117, -0.02636120468378067, -0.04969250038266182, -0.011741330847144127, -0.01514124870300293, -0.036745455116033554, -0.07577916234731674, -0.03361281007528305, -0.003115437924861908, -0.04262397065758705, 0.007837039418518543, 0.0884321928024292, 0.012420982122421265, -0.058416612446308136, -0.04640566185116768, -0.030523240566253662, 0.013329975306987762, -0.032670460641384125, 0.04908979684114456, 0.0016104059759527445, 0.0267822053283453, 0.004912
})
t.Logf("Radius %f, Midpoint: %v", r, string(p.JSON()))
*/
})
t.Run("Cup", func(t *testing.T) {
e := Embedding{0.013752159662544727, -0.06209644302725792, -0.05203453078866005, 0.05004068464040756, -0.029140783473849297, -0.02017567679286003, -0.057443562895059586, 0.027564097195863724, -0.017887884750962257, 0.011591270565986633, 0.011138231493532658, 0.016641922295093536, -0.05436382442712784, -0.009291388094425201, 0.041821204125881195, -0.020641714334487915, 0.050666701048612595, 0.05518513545393944, 0.012744207866489887, 0.026812026277184486, -0.005747167393565178, 0.09193259477615356, 0.039670493453741074, -0.05512256175279617, -0.07696390151977539, 0.01839328370988369, 0.0456295870244503, 0.04978585243225098, 0.01719575747847557, -0.03635410964488983, 0.00027501225122250617, 0.08197610825300217, 0.043580710887908936, -0.02464931271970272, -0.015474572777748108, -0.04262015223503113, -0.02856202982366085, 0.00023728566884528846, 0.04029883071780205, -0.04167935252189636, -0.026648391038179398, -0.024459555745124817, 0.016916552558541298, -0.05821489915251732, 0.05082862079143524, -0.05330951139330864, 0.03885507583618164, -0.048241741955280304, -0.019662652164697647, 0.0323975645005703, 0.012168103829026222, 0.08332370966672897, 0.053779080510139465, -0.04951723664999008, -0.08811856061220169, 0.006690997630357742, -0.06469269841909409, 0.11562515795230865, 0.042662184685468674, 0.008934368379414082, -0.03489194065332413, 0.005934728309512138, -0.038055676966905594, 0.00898660533130169, -0.018299542367458344, 0.058539897203445435, -0.007009998895227909, -0.0017516580410301685, -0.023383939638733864, -0.00813512783497572, -0.00761600024998188, 0.000339806720148772, 0.047994647175073624, 0.025400636717677116, -0.021664157509803772, -0.024009281769394875, 0.013586976565420628, -0.07572927325963974, -0.0637129470705986, -0.041140116751194, 0.011158430948853493, 0.07330124080181122, -0.018013032153248787, -0.01913454197347164, 0.025541672483086586, -0.030622441321611404, 0.03486725687980652, 0.04702776297926903, -0.07686083018779755, 0.024169502779841423, -0.033461544662714005, -0.0337384007871151, 0.09664148092269897, -0.02432338520884514, -0.037094201892614365, 0.04197841137647629, 0.005453732330352068, 0.029384136199951172, -0.03283499553799629, -0.05406608432531357, 0.015594429336488247, 0.03868358954787254, 0.03451664373278618, -0.038406968116760254, 0.050539687275886536, -0.04596829041838646, 0.03459451347589493, -0.031264808028936386, 0.008030586875975132, -0.029887238517403603, 0.03563602641224861, -0.02823842503130436, -0.0828784927725792, -0.022357741370797157, 0.018160784617066383, -0.001101673231460154, 0.03691968321800232, 0.005956575740128756, 0.023448295891284943, 0.06482123583555222, -0.05048611760139465, -0.013085119426250458, -0.03342186659574509, 0.05323881283402443, -0.05166739597916603, -0.02238074317574501, 0.06445351988077164, 0.027077453210949898, -0.002531358040869236, -0.06395924836397171, -0.017190266400575638, -0.034269072115421295, 0.042341843247413635, -0.053622838109731674, -0.04920750856399536, 0.01728804036974907, -0.043004874140024185, 0.007158726453781128, 0.060289762914180756, 0.02067073993384838, 0.012799883261322975, 0.057328011840581894, -0.013701182790100574, 0.04958059638738632, 0.00265366374514997, -0.01924964413046837, -0.06384072452783585, -0.02989046834409237, 0.07000751048326492, 0.09176922589540482, 0.0260714553296566, 0.08187873661518097, 0.019890254363417625, -0.0174320749938488, 0.05929093807935715, -0.019961928948760033, 0.014430992305278778, -0.04653369262814522, 0.043965525925159454, -0.043890319764614105, 0.02300461195409298, -0.02528192847967148, 0.0415680892765522, 0.03989613428711891, 0.0531243197619915, -0.0605732724070549, -0.009310571476817131, -0.025268608704209328, 0.01972251571714878, 0.02193635329604149, -0.02737266942858696, 0.02609758824110031, -0.06805046647787094, -0.07252658903598785, -0.08559703826904297, -0.010851000435650349, -0.07949008047580719, 0.023219378665089607, 0.04905194044113159, 0.055004287511110306, -0.039890874177217484, -0.02624371461570263, -0.03042159043252468, 0.015076524578034878, 0.005990734789520502, 0.003020947566255927
t.Logf("Cup magnitude: %f", e.Magnitude())
assert.True(t, e.Blacklisted())
})
t.Run("Window", func(t *testing.T) {
e := Embedding{0.02911793440580368, -0.02657805196940899, -0.05582059919834137, 0.029433075338602066, -0.010347411967813969, -0.0437883585691452, -0.01719910278916359, 0.03379708155989647, 0.040116291493177414, -0.0012780230026692152, -0.028184039518237114, 0.03558448702096939, -0.054644662886857986, 0.015985896810889244, -0.009933551773428917, -0.030867986381053925, 0.08947663009166718, 0.04410885274410248, 0.016108760610222816, -0.024095948785543442, 0.0019277503015473485, 0.061038099229335785, 0.09400294721126556, 0.011825635097920895, -0.07130510360002518, 0.05226944759488106, 0.026077503338456154, -0.002403449499979615, 0.0387146919965744, 0.02326650358736515, -0.06516426801681519, 0.038887664675712585, 0.02336987294256687, -0.05232160910964012, -0.03179354965686798, 0.01697697304189205, -0.059383973479270935, 0.017879735678434372, 0.0035271933302283287, 0.03116966411471367, -0.06499483436346054, 0.017210200428962708, -0.03446599841117859, 0.011310559697449207, 0.020511511713266373, -0.013348361477255821, 0.03540978580713272, 0.08153408765792847, -0.08863010257482529, 0.027557143941521645, -0.04153082147240639, 0.08518209308385849, 0.05460561439394951, -0.00509260967373848, -0.08393505960702896, 0.05111226066946983, -0.020677952095866203, 0.12282205373048782, 0.061678774654865265, -0.02400984615087509, -0.04075946286320686, -0.007096405141055584, -0.020884502679109573, -0.02719257026910782, -0.005751963704824448, 0.0339011549949646, -0.06634193658828735, 0.0603402741253376, -0.02390725165605545, 0.01417065691202879, 0.002856130013242364, 0.027137313038110733, 0.058229170739650726, 0.016302403062582016, -0.006456597242504358, -0.06220299378037453, -0.05931615084409714, -0.01871989108622074, -0.08259420096874237, -0.019265370443463326, 0.007964858785271645, 0.03329536318778992, -0.009261127561330795, 0.03060186095535755, -0.041915785521268845, -0.02041928470134735, 0.004344126209616661, 0.02770347334444523, -0.06137992814183235, -0.022406261414289474, 0.0051990654319524765, -0.011708610691130161, 0.07265359163284302, -0.036635641008615494, 0.027904348447918892, -0.010735378600656986, -0.021341411396861076, 0.04975174739956856, -0.06281881034374237, -0.05822886526584625, 0.04163268953561783, 0.016820937395095825, -0.04927929863333702, -0.01128738559782505, 0.08849763125181198, -0.026227008551359177, 0.04043696075677872, -0.0010101052466779947, 0.017911851406097412, -0.07956790179014206, 0.07445459812879562, 0.006290021352469921, -0.0765388235449791, -0.07569659501314163, 0.056237876415252686, -0.034641217440366745, 0.05620419234037399, -0.022589176893234253, -0.02227533422410488, -0.024665959179401398, -0.027809448540210724, 0.026454370468854904, -0.0012154135620221496, -0.0281841978430748, -0.06634492427110672, -0.06074248254299164, 0.010864422656595707, 0.04182087257504463, 0.01839812658727169, -0.03266937658190727, -0.06528614461421967, 0.0019207947188988328, 0.03016660176217556, -0.05803235247731209, -0.07951787859201431, -0.00947436410933733, -0.07019511610269547, 0.015433420427143574, 0.0848907008767128, 0.0642448365688324, -0.005741069093346596, 0.05455503240227699, -0.009055864997208118, 0.04258446395397186, 0.038894496858119965, -0.027821457013487816, 0.0075020152144134045, -0.03795981407165527, 0.014150748029351234, 0.05680326744914055, 0.06952846050262451, 0.010174200870096684, -0.003917880821973085, 0.01599237136542797, 0.020336398854851723, 0.016038110479712486, -0.03700350224971771, -0.008327248506247997, 0.038398850709199905, -0.10057638585567474, 0.061393484473228455, 0.036584705114364624, -0.020751893520355225, 0.05094417184591293, 0.07093091309070587, 0.0025936472229659557, -0.008558832108974457, 0.0045006731525063515, -0.058181680738925934, 0.02719442918896675, -0.005936834029853344, -0.07664960622787476, -0.04825340956449509, -0.05500617250800133, 0.007463700138032436, 0.03628788888454437, -0.08027489483356476, -0.017566995695233345, 0.06691382080316544, 0.020471086725592613, -0.03597363457083702, -0.05336826294660568, -0.04296419024467468, 0.002566613256931305, 0.028471486642956734, 0.0237280838
t.Logf("Window magnitude: %f", e.Magnitude())
t.Logf("Window blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Dalmatian", func(t *testing.T) {
e := Embedding{0.026646258309483528, -0.027234680950641632, -0.046598002314567566, 0.03628503158688545, -0.018819356337189674, 0.007703959476202726, -0.032692212611436844, 0.12524119019508362, -0.019190849736332893, -0.005543830338865519, 0.006821943446993828, 0.09052197635173798, 0.0026234982069581747, -0.042261600494384766, -0.0015102076577022672, -0.07758268713951111, -0.013937989249825478, 0.0002279259788338095, -0.009208843111991882, -0.03529713675379753, -0.09800537675619125, 0.04205315560102463, 0.01071444246917963, -0.06714940071105957, -0.016024576500058174, -0.017938051372766495, -0.004281200468540192, -0.003906877711415291, 0.03909142687916756, 0.0683499202132225, -0.006580389104783535, -0.02470361813902855, 0.013347705826163292, -0.02134637162089348, -0.01637570559978485, -0.0018088578945025802, -0.05121270939707756, 0.017718825489282608, -0.0267690047621727, 0.0736365020275116, 0.03339534252882004, 0.030867744237184525, 0.011860023252665997, -0.01027654204517603, -0.012793825007975101, 0.040147166699171066, -0.024491481482982635, 0.035660892724990845, -0.05980999022722244, -0.07612340152263641, 0.00834803655743599, -0.004732488188892603, 0.043393850326538086, -0.0017798622138798237, -0.06645412743091583, 0.060781680047512054, -0.03432569280266762, 0.09253647923469543, -0.040562063455581665, 0.02240123227238655, -0.08719266206026077, 0.027310427278280258, -0.04967907816171646, -0.029913850128650665, -0.02556425891816616, 0.04354802519083023, -0.020857322961091995, -0.007945463061332703, 0.002865595044568181, -0.07649020105600357, 0.07630413770675659, 0.04261307045817375, -0.02928168699145317, -0.05996842682361603, 0.036596719175577164, -0.0691286027431488, -0.016534283757209778, -0.025427108630537987, -0.005348315462470055, 0.015645360574126244, -0.004603080451488495, 0.011040807701647282, 0.05554540082812309, -0.03575444966554642, -0.0004593868216034025, -0.00724007049575448, -0.004787648096680641, -0.01000897865742445, 0.020312050357460976, 0.008837522938847542, 0.042510878294706345, -0.01644499972462654, 0.024724218994379044, -0.1185469701886177, -0.012266467325389385, -0.03088436648249626, 0.017647063359618187, 0.010768704116344452, -0.09721033275127411, 0.07860993593931198, 0.004318119492381811, 0.03094315342605114, 0.08767559379339218, 0.052156757563352585, 0.06397729367017746, 0.0370735228061676, 0.024893201887607574, 0.02925868332386017, 0.037951886653900146, -0.044335462152957916, 0.05891245976090431, 0.07784770429134369, -0.06189887225627899, 0.002108003245666623, 0.058803822845220566, 0.054515473544597626, 0.0466577410697937, 0.04859960824251175, -0.004205063916742802, -0.0227779783308506, -0.05351591482758522, 0.06318030506372452, -0.004482760094106197, -0.07996728271245956, 0.016884665936231613, -0.0314750038087368, -0.029315950348973274, -0.003455169266089797, 0.000278834777418524, -0.0362372063100338, -0.04891921952366829, -0.03789520636200905, 0.07659225165843964, 0.01648969203233719, -0.04136713594198227, 0.020139314234256744, -0.03831976279616356, 0.02926899679005146, 0.09600241482257843, 0.06205567717552185, -0.008440036326646805, 0.013345755636692047, -0.01746530644595623, 0.06611013412475586, 0.02675841748714447, 0.0390179269015789, -0.07807181775569916, 0.03523588553071022, 0.027623990550637245, 0.018078066408634186, 0.08260850608348846, -0.03682425990700722, -0.05607173591852188, 0.03175996243953705, 0.07956872135400772, 0.0015851265052333474, 0.06806983053684235, -0.004079481586813927, -0.05854551121592522, 0.02332674153149128, 0.037818148732185364, 0.013924544677138329, -0.06151168793439865, -0.02128257229924202, 0.07897766679525375, 0.08932406455278397, 0.0022109244018793106, -0.007865920662879944, -0.10105230659246445, 0.10908880829811096, -0.051295846700668335, -0.0006763980491086841, -0.00981240626424551, 0.008709346875548363, 0.029637020081281662, -0.002898978069424629, 0.09623362123966217, -0.09953208267688751, -0.048222459852695465, -0.0282367505133152, 0.003294126596301794, -0.016644049435853958, 0.031007293611764908, 0.00820146594196558, 0.024699145928025246, 0.02963667362
t.Logf("Dalmatian magnitude: %f", e.Magnitude())
t.Logf("Dalmatian blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Hair1", func(t *testing.T) {
e := Embedding{-0.02186507359147072, -0.02343287505209446, 0.012334531173110008, 0.06589528173208237, 0.003181028412654996, 0.023103436455130577, -0.033060502260923386, 0.04050910100340843, -0.04571661353111267, -0.016881445422768593, -0.02440449222922325, 0.0627303197979927, 0.013221108354628086, -0.017312059178948402, -0.03989502415060997, 0.030291154980659485, 0.015385689213871956, 0.03833505138754845, -0.03853273391723633, -0.06539343297481537, -0.047265298664569855, -0.005378637928515673, 0.011277339421212673, 0.023217234760522842, 0.012571279890835285, 0.012044169008731842, 0.007989807985723019, -0.03285067155957222, 0.01388829480856657, 0.06479942798614502, -0.05244818329811096, -0.050881389528512955, 0.004368424881249666, -0.039944764226675034, -0.04860450327396393, 0.06007057800889015, -0.024117710068821907, -0.027301909402012825, -0.06967205554246902, 0.07871851325035095, -0.0049963453784585, 0.05830663815140724, 0.0017558529507368803, -0.0029655308462679386, 0.0022946924436837435, 0.0948474183678627, 0.054396852850914, 0.06009141355752945, -0.01731225848197937, -0.019688088446855545, -0.006394019816070795, 0.04341787472367287, 0.020347202196717262, 0.0295484010130167, -0.02720114029943943, 0.04617561027407646, 0.05694594606757164, 0.01914539560675621, 0.01043949369341135, -0.026747386902570724, -0.019355246797204018, -0.013019140809774399, 0.010485176928341389, -0.03908209130167961, -0.025765586644411087, 0.10351331532001495, -0.03676328808069229, 0.025375237688422203, 0.027708711102604866, -0.011420972645282745, 0.04914155602455139, 0.04410508647561073, 0.05510319024324417, 0.005535257514566183, -0.026457522064447403, 0.021328607574105263, -0.0862191691994667, 0.023158293217420578, -0.01705312915146351, 0.0352226085960865, 0.050656940788030624, -0.04597005993127823, 0.06266540288925171, 0.07038892060518265, -0.005098729860037565, 0.030597317963838577, -0.0023044119589030743, 0.04612474888563156, 0.04337996616959572, 0.011935937218368053, -0.014555811882019043, 0.039222728461027145, -0.013018335215747356, -0.007112194783985615, 0.04548836499452591, -0.06039473041892052, -0.06223556026816368, -0.00940612331032753, -0.0333172008395195, 0.04146142303943634, 0.030734900385141373, -0.026868222281336784, -0.005701250862330198, 0.04213353246450424, 0.049119483679533005, 0.01556873507797718, 0.03767542541027069, -0.0792568027973175, -0.010347368195652962, -0.07231560349464417, -0.024369049817323685, 0.06508026272058487, -0.06497415155172348, -0.005637121386826038, 0.0016806387575343251, -0.027321230620145798, -0.006407047621905804, -0.01755347289144993, -0.03195110335946083, -0.06080681085586548, 0.0011495030485093594, -0.04538745433092117, -0.0031417023856192827, -0.0687950849533081, 0.025956306606531143, -0.05747046321630478, -0.04319126531481743, 0.05188388004899025, 0.05193556472659111, -0.03580246865749359, 0.033515315502882004, -0.023215007036924362, -0.010482209734618664, 0.003323460230603814, -0.029377244412899017, 0.005186772905290127, -0.033111829310655594, 0.01790827140212059, 0.009473776444792747, 0.07845223695039749, 0.007859498262405396, 0.029412848874926567, -0.008103846572339535, 0.005843850784003735, 0.06390887498855591, -0.02585470862686634, 0.008810088038444519, -0.027372995391488075, 0.005474025383591652, 0.03221543878316879, 0.06743903458118439, -0.08745471388101578, -0.0313003771007061, 0.0670057162642479, -0.016054192557930946, 0.010099897161126137, 0.05560088902711868, -0.003228723304346204, -0.06843406707048416, -0.019763188436627388, 0.041721753776073456, 0.0322103276848793, -0.09497141093015671, 0.008731914684176445, 0.023821836337447166, 0.03971601650118828, -0.049941323697566986, -0.0052082655020058155, -0.04125530272722244, -0.02955256775021553, -0.05284795165061951, -0.031147681176662445, -0.020690610632300377, 0.02056681551039219, 0.0300931166857481, 0.021964510902762413, 0.0940595343708992, -0.07598525285720825, -0.014555050060153008, -0.029066354036331177, -0.0361894816160202, -0.03464911878108978, 0.0294784065335989, 0.046739283949136734, 0.013800876215100288, 0.033814966678619385
t.Logf("Hair1 magnitude: %f", e.Magnitude())
t.Logf("Hair1 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Hair2", func(t *testing.T) {
e := Embedding{-0.07056678831577301, -0.03332336246967316, 0.08463431894779205, 0.06696385145187378, 0.005142074543982744, -0.06524451076984406, -0.07349174469709396, -0.06319113075733185, 0.016687868162989616, -0.034913621842861176, 0.03476087749004364, 0.018713563680648804, -0.0018297286005690694, 0.018387986347079277, 0.05654005706310272, 0.005042634904384613, -0.015201602131128311, 0.0770261362195015, 0.024004312232136726, 0.036976199597120285, -0.002464086515828967, 0.02513919584453106, 0.016641883179545403, -0.021559180691838264, -0.06449621170759201, 0.060183122754096985, 0.01581723988056183, -0.007955816574394703, 0.02477899380028248, 0.020169220864772797, -0.021087637171149254, 0.050271932035684586, -0.013380712829530239, -0.030434612184762955, -0.07422660291194916, -0.032203953713178635, -0.02195470780134201, 0.03863530978560448, -0.039519138634204865, 0.06319011747837067, -0.05499489605426788, -0.007015233393758535, 0.006444621365517378, 0.049160201102495193, -0.03823341429233551, -0.08745429664850235, 0.07455123215913773, 0.04647452384233475, -0.0650848001241684, 0.028375139459967613, -0.03140963986515999, 0.09503776580095291, 0.04979921877384186, 0.022749848663806915, 0.028820687904953957, -0.007359408773481846, 0.02711997926235199, 0.034156106412410736, -0.024450475350022316, 0.006517508998513222, -0.014555424451828003, -0.018514933064579964, 0.0022120303474366665, -0.0132994269952178, 0.04736936092376709, 0.07562895864248276, -0.1448953002691269, 0.0037868882063776255, -0.09171698242425919, -0.037389885634183884, 0.03342403098940849, 0.043034572154283524, 0.06563864648342133, -0.06330602616071701, -0.04816831275820732, 0.022747745737433434, 0.013718266040086746, -0.03997776284813881, -0.039804499596357346, -0.05902743712067604, 0.012449015863239765, -0.04033438861370087, 0.012104171328246593, 0.016236258670687675, 0.028925010934472084, -0.03236094489693642, -0.06139582395553589, 0.06753940880298615, -0.008502204902470112, 0.0365002267062664, 0.06811824440956116, 0.0575312003493309, 0.020441686734557152, 0.040743909776210785, -0.003850004868581891, -0.048101894557476044, -0.02956753969192505, -0.00430340925231576, 0.01596318744122982, -0.012729411013424397, -0.00530171999707818, -0.028826817870140076, -0.003394062863662839, 0.0015828009927645326, 0.06721688061952591, 0.009363928809762001, 0.0031018275767564774, -0.013773697428405285, -0.008585025556385517, 0.023941051214933395, -0.021726734936237335, 0.061123792082071304, -0.08317796140909195, 0.11060342192649841, -0.06626953929662704, 0.04460027813911438, -0.04494602605700493, 0.05633082985877991, -0.05562416464090347, -0.015336848795413971, 0.017103901132941246, -0.04723440110683441, 0.034024786204099655, 0.032124113291502, 0.007451185956597328, -0.010434882715344429, -0.013384637422859669, 0.013886917382478714, 0.06147490814328194, -0.014839456416666508, 0.015928491950035095, -0.009892764501273632, 0.11054471880197525, 0.024434298276901245, -0.01948487013578415, 0.051527123898267746, -0.05049963667988777, -0.042557232081890106, -0.04161396622657776, -0.03666619583964348, -0.03936830163002014, 0.029861046001315117, -0.04210648685693741, 0.021615229547023773, -0.020411193370819092, 0.02748953551054001, 0.02066243253648281, -0.04365302622318268, 0.016032597050070763, 0.06179943308234215, 0.026732048019766808, 0.0403854064643383, -0.007917510345578194, -0.011295943520963192, 0.038255251944065094, 0.03486952558159828, 0.004939987789839506, 0.023728806525468826, 0.014910740777850151, -0.00024114394909702241, 0.014278295449912548, -0.03869172930717468, -0.008789232932031155, 0.05729365348815918, -0.0010839541209861636, -0.03194917365908623, -0.05005102604627609, -0.019684480503201485, 0.0011725728400051594, -0.06479152292013168, -0.004202935844659805, -0.059931494295597076, -0.031350649893283844, 0.0023999859113246202, -0.09660552442073822, -0.0654047355055809, -0.009836130775511265, -0.014136970974504948, -0.016194194555282593, 0.034801509231328964, -0.0064384667202830315, 0.011279897764325142, 0.0009344230056740344, -0.029729554429650307, -0.05224978178739
t.Logf("Hair2 magnitude: %f", e.Magnitude())
t.Logf("Hair2 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Pizza", func(t *testing.T) {
e := Embedding{0.012545363046228886, -0.061116933822631836, -0.02601468190550804, 0.07787652313709259, -0.021964995190501213, -0.023282092064619064, -0.08820506185293198, 0.010442275553941727, 0.029084602370858192, 0.025907300412654877, 0.078743115067482, 0.09169194102287292, 0.002513485262170434, 0.027812410145998, -0.01141712348908186, 0.014333035796880722, 0.04622969403862953, 0.09377928078174591, -0.016980072483420372, 0.06723900139331818, 0.01565365120768547, 0.03776547312736511, 0.01959950663149357, -0.08438864350318909, -0.08823507279157639, -0.045819494873285294, -0.00987899862229824, 0.08199148625135422, -0.017163563519716263, 0.03196392208337784, -0.03880349546670914, -0.010429245419800282, 0.03400889039039612, -0.02507573924958706, -0.02711472474038601, -0.02076355367898941, -0.06196495145559311, 0.00007420445763273165, 0.007788555696606636, -0.006365785840898752, -0.053578175604343414, 0.002917165169492364, -0.014961115084588528, -0.049679115414619446, 0.021205920726060867, 0.06038018316030502, 0.04206155613064766, -0.03510258346796036, -0.02227739430963993, 0.0319143608212471, 0.012007143348455429, -0.031473204493522644, 0.04150312393903732, 0.03206299990415573, -0.07135185599327087, -0.02659107744693756, -0.049489956349134445, 0.129530668258667, -0.001706702052615583, 0.022227127104997635, -0.009720972739160061, 0.03467530757188797, -0.0368318147957325, 0.062267500907182693, -0.035633385181427, 0.0889773741364479, 0.03451388701796532, -0.028726212680339813, 0.02337571606040001, 0.015196731314063072, -0.00435465294867754, 0.03634943813085556, 0.053100794553756714, 0.024936867877840996, -0.03557504341006279, -0.05027907341718674, -0.06076475605368614, -0.0021708118729293346, -0.0010567440185695887, 0.002548838732764125, 0.043838098645210266, 0.028069010004401207, 0.055249039083719254, -0.029096569865942, 0.023744715377688408, -0.008417421020567417, 0.03569412976503372, 0.04479945823550224, -0.07184062153100967, 0.04942385107278824, -0.0048046959564089775, 0.027909867465496063, 0.04909295216202736, -0.024840859696269035, -0.003915414679795504, 0.07276055216789246, 0.07918114960193634, 0.07377838343381882, -0.038963962346315384, -0.01905442215502262, -0.0025953841395676136, 0.03661784157156944, 0.016301093623042107, 0.0453956238925457, 0.06560754030942917, -0.040288299322128296, 0.056177254766225815, -0.0159284844994545, -0.02543586492538452, 0.022719712927937508, 0.009137158282101154, -0.0016262037679553032, -0.051590144634246826, -0.04233044385910034, 0.021122964099049568, -0.03287129104137421, 0.06519603729248047, 0.041751984506845474, 0.026396363973617554, 0.0509265661239624, -0.03888273611664772, 0.005256630014628172, -0.05733426660299301, -0.05205492302775383, -0.004923680331557989, -0.023246167227625847, 0.012522782199084759, -0.002016804413869977, -0.08184214681386948, -0.09565647691488266, -0.03298015147447586, 0.010475958697497845, 0.013875200413167477, -0.04938983917236328, -0.03782426938414574, 0.004746602848172188, -0.054582349956035614, 0.05560821294784546, 0.043821677565574646, 0.0775490254163742, 0.04190433397889137, 0.06321405619382858, -0.02040085755288601, 0.07404965907335281, 0.0073580970056355, -0.024778010323643684, -0.08656046539545059, 0.02373918704688549, -0.011463992297649384, 0.0750817134976387, 0.051595963537693024, -0.0002577614795882255, -0.06305596977472305, 0.05620763450860977, 0.04583015292882919, -0.04491866007447243, -0.03542491793632507, -0.014527394436299801, -0.08535799384117126, -0.026765991002321243, 0.042345430701971054, 0.026542849838733673, 0.013871053233742714, 0.06566711515188217, 0.03165765851736069, -0.024077052250504494, -0.005411694757640362, -0.08341077715158463, 0.01584622636437416, 0.06698086857795715, -0.08994724601507187, 0.03225015103816986, -0.02775558829307556, -0.04994354024529457, -0.00590173015370965, 0.0053266603499650955, 0.01468923594802618, 0.009833848103880882, 0.021012863144278526, -0.03522282838821411, -0.04945491999387741, -0.04269673675298691, -0.048763155937194824, 0.051856011152267456, 0.005998180713504553, 0.03852929174900055, 0.01421692
t.Logf("Pizza magnitude: %f", e.Magnitude())
assert.True(t, e.Blacklisted())
})
t.Run("Mouth", func(t *testing.T) {
e := Embedding{0.0818071961402893, -0.02670663595199585, -0.04388338327407837, 0.08276037871837616, -0.06790941208600998, 0.03789176791906357, -0.06332214176654816, 0.08206091821193695, -0.05989192798733711, -0.003227150533348322, -0.015824133530259132, 0.04487046226859093, -0.06514846533536911, -0.01332323718816042, -0.019904369488358498, -0.04819081351161003, 0.08377592265605927, 0.05940860137343407, 0.022396722808480263, -0.0661005973815918, 0.016026105731725693, 0.03261292725801468, 0.005642699543386698, 0.014816517941653728, -0.05345245823264122, 0.027366245165467262, 0.027163103222846985, 0.07712122052907944, 0.030850466340780258, 0.06144077703356743, -0.059152714908123016, -0.06890091300010681, 0.018452424556016922, -0.08021985739469528, -0.047281138598918915, -0.0018729253206402063, -0.11094509810209274, 0.0428999662399292, 0.04686363786458969, -0.012471457943320274, -0.05648921802639961, 0.06422606110572815, -0.021855125203728676, -0.07533032447099686, 0.010723584331572056, 0.019587961956858635, -0.056368667632341385, -0.012293539009988308, -0.012883886694908142, 0.03776860237121582, -0.025323309004306793, 0.07278133928775787, 0.07964740693569183, 0.0028865807689726353, -0.08581559360027313, 0.017843525856733322, 0.04243101179599762, 0.07050904631614685, 0.031054070219397545, 0.027697229757905006, -0.029815763235092163, -0.003724771784618497, 0.013232680968940258, 0.0287990253418684, 0.004315348342061043, 0.03348809480667114, 0.026770438998937607, -0.0008104921435005963, 0.018644029274582863, 0.00035887211561203003, -0.04005575552582741, 0.0619829036295414, 0.012762446887791157, 0.0019664671272039413, 0.009145539253950119, -0.031211525201797485, -0.0852985605597496, -0.026104852557182312, 0.0021302697714418173, 0.02192031964659691, -0.023708004504442215, -0.041466131806373596, 0.03970984369516373, 0.01837923936545849, 0.013577239587903023, -0.02928433008491993, 0.01567188650369644, 0.0038431996945291758, -0.03661859780550003, -0.043729133903980255, -0.01424663607031107, -0.0479993037879467, -0.008989574387669563, -0.024322370067238808, 0.0016269977204501629, 0.030273018404841423, 0.042096249759197235, -0.05009687691926956, -0.02507871389389038, 0.04270801693201065, 0.010935754515230656, -0.03858715295791626, -0.026746602728962898, 0.027308344841003418, 0.08383316546678543, -0.01575608365237713, -0.022132067009806633, 0.016370894387364388, 0.05716874077916145, -0.07125204056501389, 0.06941413879394531, 0.05170678719878197, -0.05539847910404205, -0.06683334708213806, 0.04969911649823189, -0.03656375780701637, 0.011205047369003296, -0.04780178517103195, -0.012514649890363216, -0.003727744333446026, -0.04610877484083176, 0.052401717752218246, -0.07958122342824936, -0.07168949395418167, 0.012691276147961617, -0.031475767493247986, -0.0063604568131268024, 0.04088949039578438, -0.019529160112142563, 0.005899976007640362, -0.10109469294548035, -0.011112082749605179, 0.052239399403333664, -0.020688559859991074, -0.06433560699224472, 0.038858070969581604, -0.023653613403439522, 0.08269057422876358, 0.09711100906133652, 0.06777472794055939, 0.03805705904960632, 0.05151732638478279, 0.05700840801000595, 0.014179802499711514, -0.01719832606613636, -0.0012138898018747568, -0.03528042137622833, -0.015471433289349079, -0.045495349913835526, 0.08877721428871155, 0.015324071981012821, -0.0036056595854461193, -0.027256198227405548, -0.02317759394645691, 0.09318786859512329, 0.03649521246552467, 0.016537973657250404, 0.028720324859023094, -0.016964662820100784, -0.026621969416737556, 0.0374566875398159, 0.001231615082360804, 0.0014859272632747889, 0.06432097405195236, 0.02374720200896263, 0.07618646323680878, 0.03371207416057587, -0.006346920970827341, -0.07591185718774796, 0.08389206975698471, 0.007961773313581944, -0.015088549815118313, 0.029834715649485588, -0.03998756781220436, 0.020206039771437645, 0.02946779690682888, -0.004931765142828226, -0.04080476984381676, 0.0028028427623212337, -0.011422369629144669, -0.05081048607826233, -0.11411978304386139, 0.0002430275926599279, -0.03312571346759796, -0.008036168292164803, -0.01
t.Logf("Mouth magnitude: %f", e.Magnitude())
t.Logf("Mouth blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Hands", func(t *testing.T) {
e := Embedding{0.06800967454910278, 0.014943060465157032, -0.03815193474292755, 0.061972297728061676, -0.03068658523261547, 0.023386536166071892, -0.09429468214511871, 0.0281218271702528, -0.020950259640812874, -0.06430718302726746, -0.0051723662763834, 0.03371420502662659, -0.004883932415395975, -0.028872383758425713, 0.0554707795381546, -0.08306090533733368, 0.007016982417553663, 0.07661793380975723, 0.020108982920646667, -0.012177039869129658, -0.08107452839612961, 0.0019218273228034377, -0.0017007937422022223, -0.0925346314907074, -0.006843474693596363, 0.0044988361187279224, -0.014817462302744389, -0.02070135623216629, 0.061560001224279404, 0.053207140415906906, 0.004307453986257315, 0.0249142125248909, 0.000544507522135973, -0.04379061236977577, -0.05548075586557388, -0.021299464628100395, 0.004362935665994883, -0.01409577950835228, 0.0060603804886341095, 0.06408311426639557, -0.05726391822099686, -0.017893489450216293, -0.08481934666633606, -0.0520801767706871, 0.022130560129880905, -0.041218917816877365, 0.009603206999599934, 0.024055592715740204, -0.01699327677488327, -0.03296425938606262, -0.01941504143178463, -0.053286854177713394, 0.0071816351264715195, 0.048552218824625015, -0.04173465445637703, 0.019668815657496452, 0.01666739396750927, 0.06181837245821953, -0.0142489830031991, -0.013856017030775547, -0.0525357648730278, 0.06763152778148651, -0.06656254827976227, 0.012323605827987194, -0.009243583306670189, 0.05591072142124176, 0.021979764103889465, -0.004156413022428751, -0.03454184904694557, -0.08790867030620575, 0.03656799718737602, 0.07132644206285477, -0.0497322753071785, -0.01750035397708416, -0.005225967615842819, -0.11555836349725723, -0.03905574977397919, -0.04467228427529335, -0.014362022280693054, -0.019055044278502464, 0.03191450983285904, -0.010453014634549618, 0.08757585287094116, -0.029692165553569794, 0.008261462673544884, -0.037200622260570526, -0.0776897445321083, 0.012314132414758205, 0.00407141400501132, 0.04746837168931961, 0.12277686595916748, 0.016017626971006393, 0.04314332827925682, -0.0948345735669136, 0.03130676597356796, 0.05931435897946358, 0.012661945074796677, 0.01928090490400791, -0.11891371011734009, 0.05977544188499451, 0.0021558115258812904, -0.02819810062646866, 0.05190897360444069, -0.0012781992554664612, 0.014554232358932495, 0.017773766070604324, 0.015998953953385353, -0.0331634059548378, -0.052866216748952866, -0.0024563816841691732, 0.07878424227237701, 0.049375373870134354, -0.04542739316821098, 0.05561786890029907, -0.0015382841229438782, 0.0526365302503109, 0.060375113040208817, 0.0042859590612351894, 0.021306950598955154, 0.08104266226291656, -0.07422176003456116, 0.03607352450489998, 0.04333891347050667, -0.03579263016581535, -0.011166614480316639, -0.033253565430641174, 0.001504167914390564, -0.08601394295692444, -0.05513449385762215, -0.07004782557487488, 0.0054741185158491135, -0.007946699857711792, 0.025273945182561874, -0.009772094897925854, -0.05400902032852173, 0.04678212106227875, -0.02820483036339283, -0.008067966438829899, 0.06739245355129242, -0.0019745994359254837, -0.056615568697452545, 0.02644413150846958, -0.10103209316730499, 0.0345887616276741, 0.08167438954114914, 0.02648608572781086, -0.02660847268998623, -0.03116915188729763, 0.01988879032433033, 0.012142010033130646, 0.06729826331138611, 0.039178021252155304, -0.05023375526070595, 0.0006591514684259892, 0.13739371299743652, 0.04972291365265846, 0.03704720363020897, 0.0006241801311261952, 0.021746637299656868, 0.009487578645348549, 0.030556324869394302, -0.027118254452943802, -0.015532579272985458, -0.0061856834217906, -0.017525052651762962, 0.040801241993904114, -0.0035515138879418373, 0.01166065875440836, -0.07358100265264511, 0.07806885242462158, -0.0899202898144722, 0.030144575983285904, 0.0264816302806139, 0.006456506438553333, 0.012648648582398891, -0.03377404808998108, 0.03163297101855278, -0.06493984907865524, -0.03652690351009369, -0.014077319763600826, 0.031231386587023735, -0.04911602661013603, -0.05198896303772926, 0.011137476190924644, 0.018216287717223167, 0.02521651238203048
t.Logf("Hands magnitude: %f", e.Magnitude())
t.Logf("Hands blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Neckline1", func(t *testing.T) {
e := Embedding{-0.021214468404650688, -0.08825807273387909, -0.024100830778479576, -0.0749080628156662, 0.06906117498874664, -0.049879010766744614, -0.0206401739269495, 0.022474050521850586, 0.003262620186433196, -0.019519725814461708, -0.013318439014256, 0.08099097013473511, 0.041292622685432434, -0.0009268737630918622, 0.035383205860853195, 0.0635155513882637, 0.004669536836445332, -0.017719784751534462, -0.021314412355422974, 0.0012528026709333062, -0.01536466646939516, -0.0510890856385231, -0.011554482392966747, 0.0021909610368311405, 0.000988184241577983, -0.04302235692739487, -0.04827045276761055, -0.08782166242599487, 0.015939686447381973, -0.01569664478302002, -0.00002939470869023353, -0.04967746138572693, -0.029887838289141655, 0.030824510380625725, -0.026004085317254066, 0.0038077461067587137, -0.018639687448740005, -0.06636559963226318, -0.06887199729681015, 0.1230739951133728, 0.001235812553204596, -0.015357023105025291, -0.011043163947761059, 0.039761703461408615, 0.0159311480820179, 0.07689104974269867, 0.04919219762086868, 0.009077026508748531, -0.06515306979417801, -0.006734342779964209, 0.011677936650812626, 0.018189284950494766, 0.027414413169026375, 0.038556162267923355, -0.04817062243819237, -0.019315406680107117, -0.0033731264993548393, -0.03256676718592644, -0.036154769361019135, -0.030659226700663567, -0.04370402172207832, 0.029668418690562248, -0.05120636522769928, 0.03484269231557846, -0.04163138568401337, 0.04292847216129303, -0.07885508984327316, 0.0006402255385182798, -0.021691933274269104, -0.04432434216141701, 0.02800828032195568, -0.09544489532709122, 0.0369441993534565, -0.01730477809906006, -0.034752100706100464, 0.045872438699007034, 0.020005300641059875, -0.016411617398262024, -0.014964046888053417, 0.001606486621312797, 0.01681387610733509, 0.045953117311000824, -0.04028761386871338, 0.026372810825705528, 0.016764607280492783, -0.031238850206136703, -0.006362352520227432, 0.0890614241361618, 0.020816456526517868, 0.020879963412880898, 0.048431672155857086, 0.05266088247299194, 0.050555791705846786, -0.03838769719004631, 0.00036916183307766914, -0.043389249593019485, -0.09475662559270859, 0.04026512801647186, -0.024581093341112137, -0.013414999470114708, 0.031959228217601776, 0.058118365705013275, 0.05312944948673248, 0.0063401320949196815, 0.02532665990293026, -0.018715815618634224, -0.005444089882075787, -0.03840278089046478, -0.029712826013565063, -0.06228933110833168, -0.025740373879671097, 0.037858739495277405, -0.0922742635011673, 0.05937720462679863, 0.03050682693719864, 0.030648402869701385, -0.016746483743190765, 0.013065865263342857, -0.029768746346235275, -0.026974080130457878, 0.00901819672435522, -0.017012862488627434, 0.013227489776909351, -0.040640417486429214, 0.07854104787111282, 0.009712324477732182, -0.05267297849059105, 0.0025253931526094675, 0.05174652114510536, -0.02452586032450199, -0.03246896341443062, 0.003572023706510663, 0.013100586831569672, -0.012467165477573872, 0.021367736160755157, -0.010899340733885765, -0.014318828471004963, -0.04115388169884682, -0.0033794317860156298, -0.03305904194712639, -0.02712656371295452, 0.008904485031962395, -0.06452339887619019, 0.03517462685704231, 0.06803631782531738, -0.059344496577978134, -0.02991984412074089, 0.045251332223415375, 0.08184774965047836, 0.0022686761803925037, 0.020685307681560516, -0.025787128135561943, 0.0032214345410466194, 0.06131143867969513, 0.04409313574433327, -0.022299088537693024, 0.0445500910282135, 0.0071045756340026855, 0.04109949618577957, -0.006089251488447189, 0.0027454430237412453, -0.05094190686941147, -0.05369836464524269, 0.013229510746896267, 0.0872252881526947, 0.038748349994421005, -0.03548654168844223, 0.06942304223775864, 0.003663688199594617, -0.04928385466337204, -0.018708931282162666, -0.04765505716204643, -0.04992944747209549, -0.0014015285996720195, -0.025472354143857956, -0.005789888557046652, 0.026408683508634567, -0.03892185166478157, -0.044844191521406174, 0.005069330334663391, -0.03414269909262657, -0.012076916173100471, -0.04281042143702507, -0.024428600445389748, -0.0
t.Logf("Neckline1 magnitude: %f", e.Magnitude())
t.Logf("Neckline1 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
})
t.Run("Neckline2", func(t *testing.T) {
e := Embedding{-0.021047260612249374, -0.09117822349071503, -0.0036935743410140276, 0.01417315099388361, 0.020702973008155823, -0.07730448991060257, -0.022538714110851288, 0.0008960997802205384, 0.07584141194820404, -0.08703958243131638, -0.027213476598262787, 0.030831214040517807, 0.03846513107419014, -0.02574390172958374, 0.005949356593191624, 0.034153006970882416, 0.0502694770693779, 0.049452800303697586, 0.04756177216768265, 0.013959689997136593, -0.0008715657750144601, -0.008311758749186993, 0.00967266783118248, 0.029063668102025986, -0.018811305984854698, -0.02114877477288246, -0.04066148400306702, -0.043518248945474625, 0.034607499837875366, 0.07722979784011841, -0.06318975239992142, -0.03036031313240528, -0.040437206625938416, -0.0306966882199049, -0.01230829767882824, 0.013008832931518555, -0.06284645944833755, 0.021724438294768333, -0.05889994278550148, 0.1126873791217804, 0.0082920603454113, 0.04383585974574089, -0.05189816653728485, 0.004493188578635454, -0.07934847474098206, 0.015960389748215675, 0.05772770196199417, 0.0929194763302803, -0.1207270622253418, 0.023672636598348618, -0.043461039662361145, 0.06598865240812302, 0.06559981405735016, 0.08972116559743881, -0.010192264802753925, -0.00006493971886811778, 0.07417741417884827, 0.022931404411792755, 0.002648651599884033, 0.00017719563038554043, -0.03249083831906319, 0.0066436827182769775, 0.022280892357230186, 0.02954297885298729, 0.011857707984745502, 0.05364985764026642, -0.05407198518514633, 0.03159007057547569, -0.0464022271335125, -0.07352010905742645, 0.0008308703545480967, -0.00935188215225935, 0.025230437517166138, -0.042542602866888046, -0.02545572817325592, -0.017938658595085144, -0.05022764578461647, 0.027861030772328377, -0.012384142726659775, -0.03536989539861679, 0.02622094191610813, -0.039108674973249435, -0.009348583407700062, 0.05863160267472267, -0.0033685648813843727, -0.027020664885640144, -0.01528194546699524, 0.033148858696222305, -0.003938604611903429, -0.002564582973718643, 0.10723849385976791, 0.07396524399518967, 0.006011884193867445, -0.005720559507608414, 0.030343513935804367, -0.04320579767227173, -0.03716659173369408, -0.014175888150930405, -0.07664424926042557, -0.011303940787911415, -0.014239524491131306, -0.038122422993183136, -0.04236108437180519, 0.04539639130234718, 0.07109137624502182, -0.005180756561458111, 0.023847023025155067, 0.03781135752797127, 0.019286341965198517, 0.02212359942495823, 0.013462726026773453, 0.08546662330627441, -0.07789190858602524, 0.019633833318948746, -0.00977618619799614, 0.009688129648566246, -0.026129623875021935, 0.05521164461970329, -0.05941189080476761, -0.021663838997483253, -0.0097630200907588, -0.02597961388528347, 0.053157515823841095, -0.08618530631065369, 0.04335147514939308, 0.06053593009710312, -0.03177686780691147, -0.02400903031229973, -0.021391961723566055, -0.011104932986199856, -0.036599744111299515, 0.02093241922557354, 0.02867083065211773, -0.03826045244932175, -0.00466502271592617, 0.04794762656092644, -0.06816736608743668, 0.012903828173875809, 0.03275635838508606, -0.007293709088116884, -0.06861128658056259, -0.004334226716309786, -0.009978098794817924, 0.040290467441082, 0.04147408902645111, -0.03715590015053749, 0.0018661987269297242, 0.02434059977531433, -0.02293923869729042, -0.022093895822763443, 0.08443142473697662, -0.05705507844686508, -0.009666470810770988, 0.006215548142790794, 0.006407914683222771, 0.02969067543745041, 0.026140712201595306, 0.058914732187986374, -0.0002614355180412531, 0.028481315821409225, 0.011693334206938744, -0.002098239026963711, -0.05217684805393219, 0.0033446091692894697, 0.012253424152731895, 0.07924586534500122, -0.06503402441740036, 0.01831119693815708, -0.037110310047864914, -0.038805507123470306, -0.016300713643431664, -0.09109119325876236, 0.05010674148797989, -0.02111317217350006, 0.0369328148663044, 0.02087623067200184, 0.026787076145410538, -0.06654538214206696, -0.0032995748333632946, -0.055970706045627594, -0.05383675917983055, 0.00559749873355031, -0.01536683738231659, -0.01740189827978611, -0.038632750511169434, 0.0841
t.Logf("Neckline2 magnitude: %f", e.Magnitude())
t.Logf("Neckline2 blacklist dist: %f", Blacklist.Distance(e))
assert.True(t, e.Blacklisted())
/*
p, r, _ := EmbeddingsMidpoint(Embeddings{
Embedding{-0.021214468404650688, -0.08825807273387909, -0.024100830778479576, -0.0749080628156662, 0.06906117498874664, -0.049879010766744614, -0.0206401739269495, 0.022474050521850586, 0.003262620186433196, -0.019519725814461708, -0.013318439014256, 0.08099097013473511, 0.041292622685432434, -0.0009268737630918622, 0.035383205860853195, 0.0635155513882637, 0.004669536836445332, -0.017719784751534462, -0.021314412355422974, 0.0012528026709333062, -0.01536466646939516, -0.0510890856385231, -0.011554482392966747, 0.0021909610368311405, 0.000988184241577983, -0.04302235692739487, -0.04827045276761055, -0.08782166242599487, 0.015939686447381973, -0.01569664478302002, -0.00002939470869023353, -0.04967746138572693, -0.029887838289141655, 0.030824510380625725, -0.026004085317254066, 0.0038077461067587137, -0.018639687448740005, -0.06636559963226318, -0.06887199729681015, 0.1230739951133728, 0.001235812553204596, -0.015357023105025291, -0.011043163947761059, 0.039761703461408615, 0.0159311480820179, 0.07689104974269867, 0.04919219762086868, 0.009077026508748531, -0.06515306979417801, -0.006734342779964209, 0.011677936650812626, 0.018189284950494766, 0.027414413169026375, 0.038556162267923355, -0.04817062243819237, -0.019315406680107117, -0.0033731264993548393, -0.03256676718592644, -0.036154769361019135, -0.030659226700663567, -0.04370402172207832, 0.029668418690562248, -0.05120636522769928, 0.03484269231557846, -0.04163138568401337, 0.04292847216129303, -0.07885508984327316, 0.0006402255385182798, -0.021691933274269104, -0.04432434216141701, 0.02800828032195568, -0.09544489532709122, 0.0369441993534565, -0.01730477809906006, -0.034752100706100464, 0.045872438699007034, 0.020005300641059875, -0.016411617398262024, -0.014964046888053417, 0.001606486621312797, 0.01681387610733509, 0.045953117311000824, -0.04028761386871338, 0.026372810825705528, 0.016764607280492783, -0.031238850206136703, -0.006362352520227432, 0.0890614241361618, 0.020816456526517868, 0.020879963412880898, 0.048431672155857086, 0.05266088247299194, 0.050555791705846786, -0.03838769719004631, 0.00036916183307766914, -0.043389249593019485, -0.09475662559270859, 0.04026512801647186, -0.024581093341112137, -0.013414999470114708, 0.031959228217601776, 0.058118365705013275, 0.05312944948673248, 0.0063401320949196815, 0.02532665990293026, -0.018715815618634224, -0.005444089882075787, -0.03840278089046478, -0.029712826013565063, -0.06228933110833168, -0.025740373879671097, 0.037858739495277405, -0.0922742635011673, 0.05937720462679863, 0.03050682693719864, 0.030648402869701385, -0.016746483743190765, 0.013065865263342857, -0.029768746346235275, -0.026974080130457878, 0.00901819672435522, -0.017012862488627434, 0.013227489776909351, -0.040640417486429214, 0.07854104787111282, 0.009712324477732182, -0.05267297849059105, 0.0025253931526094675, 0.05174652114510536, -0.02452586032450199, -0.03246896341443062, 0.003572023706510663, 0.013100586831569672, -0.012467165477573872, 0.021367736160755157, -0.010899340733885765, -0.014318828471004963, -0.04115388169884682, -0.0033794317860156298, -0.03305904194712639, -0.02712656371295452, 0.008904485031962395, -0.06452339887619019, 0.03517462685704231, 0.06803631782531738, -0.059344496577978134, -0.02991984412074089, 0.045251332223415375, 0.08184774965047836, 0.0022686761803925037, 0.020685307681560516, -0.025787128135561943, 0.0032214345410466194, 0.06131143867969513, 0.04409313574433327, -0.022299088537693024, 0.0445500910282135, 0.0071045756340026855, 0.04109949618577957, -0.006089251488447189, 0.0027454430237412453, -0.05094190686941147, -0.05369836464524269, 0.013229510746896267, 0.0872252881526947, 0.038748349994421005, -0.03548654168844223, 0.06942304223775864, 0.003663688199594617, -0.04928385466337204, -0.018708931282162666, -0.04765505716204643, -0.04992944747209549, -0.0014015285996720195, -0.025472354143857956, -0.005789888557046652, 0.026408683508634567, -0.03892185166478157, -0.044844191521406174, 0.005069330334663391, -0.03414269909262657, -0.012076916173100471, -0.04281042143702507, -0.024428600445389748, -0.0148
Embedding{-0.021047260612249374,-0.09117822349071503,-0.0036935743410140276,0.01417315099388361,0.020702973008155823,-0.07730448991060257,-0.022538714110851288,0.0008960997802205384,0.07584141194820404,-0.08703958243131638,-0.027213476598262787,0.030831214040517807,0.03846513107419014,-0.02574390172958374,0.005949356593191624,0.034153006970882416,0.0502694770693779,0.049452800303697586,0.04756177216768265,0.013959689997136593,-0.0008715657750144601,-0.008311758749186993,0.00967266783118248,0.029063668102025986,-0.018811305984854698,-0.02114877477288246,-0.04066148400306702,-0.043518248945474625,0.034607499837875366,0.07722979784011841,-0.06318975239992142,-0.03036031313240528,-0.040437206625938416,-0.0306966882199049,-0.01230829767882824,0.013008832931518555,-0.06284645944833755,0.021724438294768333,-0.05889994278550148,0.1126873791217804,0.0082920603454113,0.04383585974574089,-0.05189816653728485,0.004493188578635454,-0.07934847474098206,0.015960389748215675,0.05772770196199417,0.0929194763302803,-0.1207270622253418,0.023672636598348618,-0.043461039662361145,0.06598865240812302,0.06559981405735016,0.08972116559743881,-0.010192264802753925,-0.00006493971886811778,0.07417741417884827,0.022931404411792755,0.002648651599884033,0.00017719563038554043,-0.03249083831906319,0.0066436827182769775,0.022280892357230186,0.02954297885298729,0.011857707984745502,0.05364985764026642,-0.05407198518514633,0.03159007057547569,-0.0464022271335125,-0.07352010905742645,0.0008308703545480967,-0.00935188215225935,0.025230437517166138,-0.042542602866888046,-0.02545572817325592,-0.017938658595085144,-0.05022764578461647,0.027861030772328377,-0.012384142726659775,-0.03536989539861679,0.02622094191610813,-0.039108674973249435,-0.009348583407700062,0.05863160267472267,-0.0033685648813843727,-0.027020664885640144,-0.01528194546699524,0.033148858696222305,-0.003938604611903429,-0.002564582973718643,0.10723849385976791,0.07396524399518967,0.006011884193867445,-0.005720559507608414,0.030343513935804367,-0.04320579767227173,-0.03716659173369408,-0.014175888150930405,-0.07664424926042557,-0.011303940787911415,-0.014239524491131306,-0.038122422993183136,-0.04236108437180519,0.04539639130234718,0.07109137624502182,-0.005180756561458111,0.023847023025155067,0.03781135752797127,0.019286341965198517,0.02212359942495823,0.013462726026773453,0.08546662330627441,-0.07789190858602524,0.019633833318948746,-0.00977618619799614,0.009688129648566246,-0.026129623875021935,0.05521164461970329,-0.05941189080476761,-0.021663838997483253,-0.0097630200907588,-0.02597961388528347,0.053157515823841095,-0.08618530631065369,0.04335147514939308,0.06053593009710312,-0.03177686780691147,-0.02400903031229973,-0.021391961723566055,-0.011104932986199856,-0.036599744111299515,0.02093241922557354,0.02867083065211773,-0.03826045244932175,-0.00466502271592617,0.04794762656092644,-0.06816736608743668,0.012903828173875809,0.03275635838508606,-0.007293709088116884,-0.06861128658056259,-0.004334226716309786,-0.009978098794817924,0.040290467441082,0.04147408902645111,-0.03715590015053749,0.0018661987269297242,0.02434059977531433,-0.02293923869729042,-0.022093895822763443,0.08443142473697662,-0.05705507844686508,-0.009666470810770988,0.006215548142790794,0.006407914683222771,0.02969067543745041,0.026140712201595306,0.058914732187986374,-0.0002614355180412531,0.028481315821409225,0.011693334206938744,-0.002098239026963711,-0.05217684805393219,0.0033446091692894697,0.012253424152731895,0.07924586534500122,-0.06503402441740036,0.01831119693815708,-0.037110310047864914,-0.038805507123470306,-0.016300713643431664,-0.09109119325876236,0.05010674148797989,-0.02111317217350006,0.0369328148663044,0.02087623067200184,0.026787076145410538,-0.06654538214206696,-0.0032995748333632946,-0.055970706045627594,-0.05383675917983055,0.00559749873355031,-0.01536683738231659,-0.01740189827978611,-0.038632750511169434,0.08410165458917618,0.005646675359457731,0.009784942492842674,-0.06687989830970764,-0.08488636463880539,0.02366507798433304,-0.056903690099716187,0.034912046045064926,-0.003857448697090149,0.014
})
t.Logf("Radius %f, Midpoint: %v", r, string(p.JSON()))
*/
})
t.Run("PaintedPerson", func(t *testing.T) {
e := Embedding{0.01597357913851738, -0.07193982601165771, 0.043656475841999054, 0.04960828647017479, -0.008978357538580894, 0.06066560000181198, -0.020420748740434647, 0.0173389483243227, -0.019165219739079475, -0.03516208752989769, -0.04103156551718712, 0.018409833312034607, 0.04072514921426773, 0.05058896169066429, 0.015338804572820663, 0.030164213851094246, -0.015386463142931461, 0.03273216634988785, 0.04219293221831322, -0.1108786091208458, -0.10304711014032364, 0.020315513014793396, 0.057943981140851974, -0.0027196938171982765, -0.0061768414452672005, 0.0260649174451828, -0.08365893363952637, -0.09976255148649216, -0.03090636245906353, -0.0025166093837469816, -0.06923917680978775, 0.034817129373550415, 0.0253363735973835, -0.025557270273566246, -0.022549046203494072, 0.044226013123989105, 0.04888883978128433, 0.03800947964191437, -0.09485054761171341, -0.00033863651333376765, -0.010704882442951202, 0.05157643184065819, 0.015239695087075233, -0.01969643123447895, 0.0014363847440108657, 0.0009661687654443085, 0.04228316247463226, 0.03631330654025078, -0.07720259577035904, -0.044195886701345444, -0.02269810624420643, 0.09080266952514648, 0.010291875340044498, 0.02037722058594227, -0.08863915503025055, 0.0035208254121243954, 0.06523952633142471, 0.0441037081182003, 0.007976756431162357, 0.0045996662229299545, -0.03677069768309593, -0.06329121440649033, 0.012780512683093548, -0.03916202858090401, -0.06256367266178131, 0.0803549736738205, -0.03259962052106857, 0.017731521278619766, 0.03806477040052414, 0.009746663272380829, 0.010604199953377247, -0.017310233786702156, 0.10745426267385483, 0.0032290273811668158, -0.012216795235872269, -0.01717674359679222, -0.04497332125902176, 0.016326576471328735, -0.023344388231635094, 0.0020901684183627367, 0.054117463529109955, -0.013483460992574692, -0.006190767046064138, 0.023456061258912086, -0.026996703818440437, 0.0846126601099968, -0.0005202461616136134, 0.05341147258877754, -0.049257174134254456, -0.012583576142787933, 0.008442644961178303, 0.035333383828401566, 0.025291845202445984, -0.010890500620007515, 0.04216349869966507, -0.0476442351937294, -0.026283128187060356, -0.03478209301829338, -0.05787711963057518, 0.009672915562987328, 0.03499358892440796, -0.02469063177704811, -0.006710068788379431, -0.004809626843780279, 0.05640732869505882, -0.04302126541733742, 0.028157107532024384, -0.10112379491329193, -0.04380965605378151, -0.11678586900234222, -0.03923406824469566, 0.06040608510375023, -0.10087518393993378, -0.0530724972486496, -0.023564834147691727, -0.00684269517660141, 0.05356975644826889, -0.035915307700634, -0.025520041584968567, -0.01648668944835663, -0.06130196899175644, -0.01658470556139946, 0.004858672618865967, -0.03841536492109299, 0.017837807536125183, -0.03939996287226677, -0.015943342819809914, 0.07338301092386246, 0.0807722881436348, -0.022905180230736732, 0.0336654931306839, -0.03565594553947449, 0.05552743002772331, 0.04095354676246643, -0.031242642551660538, 0.039830368012189865, -0.038103893399238586, -0.010134496726095676, 0.05570278689265251, 0.02351784147322178, -0.02299611270427704, 0.053819019347429276, 0.034673627465963364, 0.031377315521240234, 0.04231230914592743, -0.023052338510751724, -0.010306629352271557, -0.015399642288684845, 0.051914919167757034, 0.07044005393981934, 0.09296474605798721, -0.08138900995254517, -0.033701006323099136, 0.004072033800184727, -0.0020206875633448362, 0.048470474779605865, 0.0028269262984395027, 0.05156606063246727, 0.025790657848119736, -0.058407314121723175, -0.03125441446900368, 0.01334269531071186, -0.05527856945991516, 0.0296731386333704, 0.019522489979863167, 0.026443053036928177, -0.12732702493667603, -0.0034121081698685884, 0.012761381454765797, 0.036282408982515335, 0.03162815421819687, -0.04704444855451584, -0.024629021063447, 0.01591433398425579, -0.0005493798526003957, -0.0501101016998291, 0.03899604082107544, -0.038960520178079605, -0.01800590194761753, 0.029212797060608864, -0.06600833684206009, 0.031156904995441437, 0.024141786620020866, -0.003317768219858408, -0.003920566290616989, -0.00693986
t.Logf("PaintedPerson magnitude: %f", e.Magnitude())
t.Logf("PaintedPerson blacklist dist: %f", Blacklist.Distance(e))
assert.False(t, e.Blacklisted())
})
t.Run("RealPerson1", func(t *testing.T) {
e := Embedding{-0.037731018, -0.005501065, 0.04339579, 0.050818004, -0.059338734, 0.033849984, -0.006599584, -0.0017643301, 0.049746443, -0.103716515, 0.037138782, -0.0064612515, 0.071909964, 0.013218528, -0.065359734, 0.11057091, 0.031195551, 0.025612833, 0.0075477255, -0.034973715, -0.013490629, -0.08104751, -0.022038054, -0.05304818, 0.008366317, -0.056096837, -0.008484318, 0.049539477, 0.019540254, 0.067417614, -0.027856546, -0.008532138, -0.017063588, -0.00016265438, -0.106199585, 0.03904082, 0.030587498, 0.043008707, -0.015111545, -0.022849092, 0.0025588698, -0.012814152, 0.037556626, -0.0086288145, 0.05265788, 0.011832273, 0.00015048613, -0.0081366515, 0.0013409692, 0.028389124, 0.022627315, -0.015008434, -0.0007749727, 0.013927345, -0.012275729, -0.0090859635, 0.019502806, -0.011900984, 0.016286656, 0.08094661, 0.000306613, -0.06327904, 0.018552454, 0.08885108, -0.07583091, 0.09275318, -0.018484656, 0.074180886, -0.039385945, -0.08063905, -0.05360434, -0.037074074, 0.09909196, 0.025063906, -0.009406389, -0.029612983, -0.018644262, 0.08433939, -0.04466277, -0.07118042, -0.0053266245, -0.07471344, 0.06739151, -0.05399609, 0.03125197, -0.00007781149, -0.04214992, -0.044316035, 0.025013437, 0.031466946, 0.0023496088, 0.042693187, -0.046198968, 0.026152546, -0.017578958, 0.023763098, 0.027511515, -0.05229892, -0.005204117, 0.035853546, -0.031919815, -0.027175877, -0.033706605, 0.018576957, -0.0010251165, -0.006808904, 0.009910016, -0.046926413, -0.02833718, 0.0132687995, -0.033933964, 0.06434295, 0.046245363, 0.044698197, 0.041076522, 0.04224362, -0.050834127, 0.0037004466, 0.061506275, -0.018232772, 0.067569405, 0.048701495, 0.042266034, -0.11045008, 0.03627151, -0.07259142, -0.0027725939, 0.040572345, 0.010365194, -0.018683784, 0.004533848, 0.037213936, -0.050944775, 0.07134523, 0.004012727, 0.036228556, -0.013853831, -0.06910639, -0.011394227, -0.012075533, 0.036311198, -0.02587341, -0.04086224, -0.024498813, -0.019423751, -0.022674281, 0.052483488, 0.026303312, -0.051178075, 0.008410645, 0.039851066, -0.028721321, -0.027934253, -0.029567441, 0.054549955, 0.07423011, -0.07211806, 0.015979288, 0.002092099, 0.049062036, 0.025120452, 0.045975365, 0.025024865, -0.04019101, 0.0013054911, -0.0049644294, 0.0065203104, -0.03237452, -0.020704443, 0.028736785, -0.027353559, 0.07551169, 0.0842262, 0.019992182, 0.11138123, -0.028617613, 0.06700691, -0.048681036, -0.008201593, -0.058066163, 0.027867565, 0.07693089, -0.033642102, -0.05855467, -0.08575646, -0.019721355, 0.018443357, -0.0037373751, 0.032450553, -0.0074002664, -0.028135147, 0.046631414, 0.0192969, -0.0071076434, -0.004898368, 0.011896125, -0.026020564, 0.074016415, -0.033884488, -0.07919758, 0.021606326, -0.0142197255, 0.0807476, 0.03722956, -0.0015949347, 0.008076167, -0.009640628, 0.02341143, 0.015375526, -0.059428506, 0.051759534, 0.028049389, 0.07790443, 0.0478649, 0.09191913, -0.055882096, -0.026637457, 0.01236174, -0.0033003334, 0.008522798, 0.027216703, -0.033221588, -0.028086975, -0.11505473, -0.044336796, 0.013873659, 0.03982099, 0.060988583, -0.07439005, 0.01333661, -0.004818605, 0.02561305, -0.059055943, 0.0081638545, -0.032278564, 0.046092775, 0.025316834, -0.046857174, -0.0341012, 0.04379944, -0.029710777, 0.09238533, 0.009769442, 0.018552538, -0.02632421, 0.033739865, -0.022547472, 0.016400741, -0.05336998, -0.012623122, -0.08303054, -0.010368709, 0.01690871, 0.0014627968, -0.050720602, 0.038742293, -0.065664165, -0.10676187, -0.013403239, 0.075702645, -0.055623896, -0.03871971, -0.042371742, 0.03794916, -0.0590573, -0.002583715, -0.029995736, -0.08144537, -0.043295015, -0.034286328, -0.026538746, 0.01953962, 0.08203153, 0.036415525, 0.045531306, 0.004713152, 0.026550433, -0.0055336948, -0.031087596, -0.01923592, -0.1047651, 0.051826596, -0.009522955, 0.0023846119, -0.030824797, 0.0011774554, 0.03384506, 0.010090165, -0.033521466, -0.052155476, 0.0032979914, -0.004305921, -0.08622774, 0.03262125, 0.06332183, 0.00067599304, 0.01989574, 0.04406689, 0.019945903, -0.003796719, 0.00025200442, -0.010055775, 0.04070448, -0.004082432, -0.026942603, 0.11013
t.Logf("RealPerson1 magnitude: %f", e.Magnitude())
t.Logf("RealPerson1 blacklist dist: %f", Blacklist.Distance(e))
assert.False(t, e.Blacklisted())
})
t.Run("RealPerson2", func(t *testing.T) {
e := Embedding{0.05743743, 0.06322246, 0.04731233, -0.01582013, -0.014022472, 0.028749773, -0.079572044, 0.010417165, 0.012425559, -0.013655686, -0.05018789, 0.026249807, 0.037449032, 0.051438555, -0.055292394, 0.018136416, 0.035481997, 0.021924775, 0.0449153, -0.046709806, 0.025960712, -0.063309774, 0.037570722, 0.0053055496, 0.07164356, -0.058082405, 0.0017537506, 0.05310737, 0.008366767, 0.001858572, -0.0444527, -0.04880738, -0.033274952, -0.08379612, -0.018964237, -0.0029277618, -0.021386296, 0.0375952, -0.034034044, -0.060141306, -0.0727236, 0.05060482, -0.082235344, 0.04422095, 0.074947104, 0.020209799, 0.0017703519, -0.015411033, 0.012017898, 0.02179871, -0.013231191, -0.08483583, 0.0057485234, -0.019012775, -0.04857383, 0.084329374, 0.009039854, 0.040807534, -0.01692938, 0.0017201875, 0.036594935, -0.08844029, -0.00285713, 0.054565318, -0.047155175, 0.017556412, 0.009818504, 0.113506615, -0.009222306, -0.0004704829, -0.0005908021, 0.023356704, 0.015126567, 0.035651624, 0.025497274, -0.10676789, -0.06828348, 0.112095155, 0.08150907, 0.0007053766, -0.008199173, -0.03852071, 0.029535439, -0.030568745, -0.08978221, -0.004848515, -0.03737906, 0.036448833, 0.004548617, 0.08181337, -0.0087715015, 0.02876368, -0.0060202847, -0.013462866, -0.05015226, -0.03569624, 0.049505115, 0.011994855, -0.010969182, -0.0038046215, -0.004821639, 0.01422656, -0.05946822, -0.013812223, 0.039755587, 0.034921456, -0.05158028, -0.0008751564, -0.031674784, -0.002480392, 0.013109971, -0.017252844, 0.064675435, 0.07642624, 0.08362122, 0.030908048, 0.067052245, 0.021291262, 0.01784629, -0.0507172, 0.052007917, 0.04663132, 0.0064223176, -0.027726524, 0.08033194, 0.038676508, 0.018382965, 0.048913725, -0.022436062, 0.0056725373, -0.040102404, 0.037674494, -0.022307452, -0.03098931, 0.0577183, -0.022725038, -0.0055031423, 0.045162845, -0.014300147, -0.018093627, -0.040114313, -0.051383376, -0.030573318, -0.101557806, -0.008447289, 0.014637746, 0.050047614, -0.011550598, 0.027773034, -0.03317795, -0.048737925, -0.02800452, -0.016925864, -0.037572905, 0.025179392, 0.031473313, -0.010588548, -0.0119464, 0.0057186596, 0.049826983, -0.026282294, -0.00095309806, 0.04696705, -0.0444816, -0.04687481, -0.05711774, 0.07398202, -0.0066416007, -0.016446855, 0.051111717, -0.0419391, -0.013271554, 0.043318115, 0.0012680996, 0.037176434, -0.021031545, 0.03968714, 0.048614495, -0.0058204047, -0.010237752, 0.07029732, 0.018752169, -0.0616816, 0.008854898, 0.06205655, -0.009874518, -0.050585378, 0.012557405, 0.01626891, 0.017797807, -0.03568621, -0.007182635, 0.015247179, 0.02795279, 0.009831571, 0.045041207, -0.055870973, -0.025731718, 0.01907759, -0.034226514, 0.029678043, -0.021697098, -0.020734878, 0.057307053, -0.008900531, -0.019598745, -0.03082626, 0.014591779, 0.06420119, -0.059627317, -0.03732171, 0.016718497, -0.0027331563, 0.013793794, 0.06873449, 0.031878877, -0.025323479, 0.017207827, -0.00025769856, 0.01302832, -0.033877812, 0.1036087, -0.031368185, -0.0062403507, -0.020410763, 0.064998895, -0.049161144, 0.075556606, -0.005309279, 0.024778325, -0.055955246, -0.053952686, 0.04611469, -0.040877238, 0.0366899, 0.05907716, -0.023292458, -0.081198305, 0.078474045, 0.050623402, -0.06233864, 0.07453958, 0.0152983265, -0.04816594, 0.023196025, -0.03438517, -0.024680838, -0.04664079, 0.054698855, 0.0038191404, 0.0024043208, 0.0034349218, -0.03711057, 0.001107596, -0.0028691792, 0.00030419108, 0.037632354, 0.060571946, -0.0946064, 0.042204216, -0.037838906, 0.021439435, -0.076814726, 0.06236704, 0.012242562, -0.061841127, 0.016115433, -0.063648604, 0.025584254, 0.10527214, -0.079565875, 0.008840051, 0.06655628, -0.0051484755, -0.08278825, -0.023478502, 0.0713399, -0.018204115, 0.048147563, -0.12774643, -0.014040633, 0.052833144, 0.0025820592, 0.029898077, 0.09640923, 0.08246072, 0.02947083, -0.015254255, -0.05879318, -0.08034651, -0.03984985, -0.008921548, 0.0035848247, 0.01210673, 0.01669468, -0.011540037, 0.043646365, 0.12930681, 0.028525097, -0.033249676, 0.009854595, 0.020683004, -0.03317388, 0.030189851, -0.037221596, 0.056988247, 0.028217647, -0.098849
t.Logf("RealPerson2 magnitude: %f", e.Magnitude())
t.Logf("RealPerson2 blacklist dist: %f", Blacklist.Distance(e))
assert.False(t, e.Blacklisted())
})
}
func TestEmbedding_NotBlacklisted(t *testing.T) {
t.Run("Noise", func(t *testing.T) {
e := Embedding{-0.00067741907, -0.0473858, -0.055704225, 0.066581585, 0.005290037, 0.03822874, -0.05082791, 0.049087, 0.018308854, -0.01478969, -0.0017964382, 0.057903986, -0.02245441, -0.033446193, -0.0071987803, -0.03150515, 0.017724376, 0.019948162, 0.056362633, -0.11701946, -0.09725581, 0.013104323, 0.07357148, -0.020104313, -0.014956488, -0.017257847, -0.020743687, -0.046340823, -0.021527996, 0.057039287, -0.051751148, -0.00595411, 0.011733857, -0.04644382, -0.028774152, 0.038308877, -0.015685631, 0.0038190065, -0.094677314, 0.07005245, -0.003068884, 0.050274804, -0.018143218, 0.012056174, 0.019058047, -0.00077958487, 0.030408988, 0.0885491, -0.11106459, -0.019910613, 0.01465938, 0.032499526, 0.04720623, 0.03163276, -0.079508044, 0.07914293, 0.03724754, 0.05636608, -0.016979787, -0.04298359, -0.03599786, 0.058342796, -0.024069536, -0.03200436, 0.015390179, 0.07293075, -0.0013783299, -0.01605161, -0.0045498423, -0.016551308, 0.060823392, 0.073548146, -0.021239666, -0.036749583, 0.00028047478, -0.025989566, -0.05310693, -0.009845653, -0.012862101, 0.058108855, 0.06915682, 0.021099294, 0.001225616, 0.033261415, 0.042154703, 0.05271609, -0.030613305, 0.041209485, 0.0019353209, -0.0019135632, 0.080911145, 0.011060149, 0.05281461, -0.10160427, 0.053647887, 0.01762615, -0.018661015, 0.02777136, -0.056023918, 0.057687696, 0.06513923, -0.069180146, -0.015231091, 0.03774808, 0.012945786, 0.090585396, 0.019942591, -0.015280875, -0.0011742035, -0.042135417, 0.05812486, 0.05519544, -0.06453465, -0.04014237, -0.03199121, 0.009241696, 0.043912023, 0.015467731, 0.0020673021, 0.08763925, -0.08974939, -0.05304043, 0.016309343, -0.04766073, -0.0046682972, -0.040477246, 0.012679025, 0.005960806, -0.03256039, -0.07089416, -0.02648642, -0.062463485, 0.08295411, -0.037147924, -0.074104264, 0.077417135, -0.042383663, 0.002088579, 0.07709948, 0.06521331, -0.07541816, 0.057679284, -0.0038482754, 0.055191133, 0.058614884, -0.018541405, -0.012277692, 0.057926673, -0.01724738, 0.020869015, 0.046103075, -0.0319926, -0.0671411, 0.02629761, 0.044356663, 0.036788594, 0.028035736, 0.06419986, 0.045972086, -0.044160895, 0.09784713, 0.00953585, -0.06252615, 0.025597766, 0.029688764, 0.027506752, -0.055384982, -0.028262418, -0.057812758, 0.042470966, -0.05840525, -0.03801629, 0.0043816785, -0.015086851, 0.022297874, 0.054110903, 0.07420415, -0.040949743, -0.08912868, -0.060081407, -0.046966024, -0.04826231, -0.031198893, 0.06643161, 0.01347482, 0.029003717, 0.047974125, 0.07580259, 0.0364837, 0.012980756, 0.020622224, -0.022555852, 0.10519882, -0.03425076, 0.03889103, -0.007944982, 0.060116176, 0.038143042, -0.043681793, 0.05316621, 0.0016697546, -0.0033659195, 0.020053076, -0.07204762, 0.009732797, 0.03862544, 0.03913928, -0.009832126, 0.06401315, 0.044209804, -0.051490918, 0.014780334, -0.025438532, -0.01395564, -0.038089562, -0.009803314, -0.04146325, 0.03357636, -0.009009651, 0.04373462, -0.05627207, -0.072068065, -0.007331119, -0.04238925, -0.021102922, -0.021610938, -0.063095644, -0.05075978, -0.07491732, 0.0113026835, 0.04940704, 0.084163934, -0.01636119, -0.06292533, -0.014526007, -0.007826649, 0.07212185, 0.004734863, -0.062791124, -0.016170232, -0.016590146, -0.024280416, -0.019522576, 0.01579864, 0.002749153, 0.053687476, -0.016495354, 0.03662209, -0.018870195, 0.039446633, 0.04715818, 0.013310755, 0.028033575, 0.067203104, -0.005826697, 0.042239364, -0.020745477, 0.0015561507, 0.065384425, 0.09041862, 0.01788624, -0.010026493, 0.0639752, -0.0041079777, -0.058741663, 0.034099422, 0.016963305, -0.0052649197, -0.07403116, -0.0029912698, -0.07583906, 0.001012409, -0.029492352, -0.04166984, -0.048218843, -0.06306306, -0.0033243645, -0.02919451, 0.0039520795, -0.037993237, 0.044352133, 0.03976749, -0.030565975, -0.076377496, -0.06569797, 0.01630497, 0.017201763, 0.028935125, 0.004058029, -0.09946857, 0.036038112, -0.06792709, 0.04493338, 0.035801385, -0.048764315, -0.06326099, 0.037968885, 0.038012274, 0.038041856, 0.04288072, 0.01531972, 0.032477308, 0.043926656, -0.0077148937, 0.056322563, -0.03451439, -0.0083661955, 0.0015379508, -0.0078794
assert.False(t, e.NotBlacklisted())
})
t.Run("RealPerson1", func(t *testing.T) {
e := Embedding{-0.037731018, -0.005501065, 0.04339579, 0.050818004, -0.059338734, 0.033849984, -0.006599584, -0.0017643301, 0.049746443, -0.103716515, 0.037138782, -0.0064612515, 0.071909964, 0.013218528, -0.065359734, 0.11057091, 0.031195551, 0.025612833, 0.0075477255, -0.034973715, -0.013490629, -0.08104751, -0.022038054, -0.05304818, 0.008366317, -0.056096837, -0.008484318, 0.049539477, 0.019540254, 0.067417614, -0.027856546, -0.008532138, -0.017063588, -0.00016265438, -0.106199585, 0.03904082, 0.030587498, 0.043008707, -0.015111545, -0.022849092, 0.0025588698, -0.012814152, 0.037556626, -0.0086288145, 0.05265788, 0.011832273, 0.00015048613, -0.0081366515, 0.0013409692, 0.028389124, 0.022627315, -0.015008434, -0.0007749727, 0.013927345, -0.012275729, -0.0090859635, 0.019502806, -0.011900984, 0.016286656, 0.08094661, 0.000306613, -0.06327904, 0.018552454, 0.08885108, -0.07583091, 0.09275318, -0.018484656, 0.074180886, -0.039385945, -0.08063905, -0.05360434, -0.037074074, 0.09909196, 0.025063906, -0.009406389, -0.029612983, -0.018644262, 0.08433939, -0.04466277, -0.07118042, -0.0053266245, -0.07471344, 0.06739151, -0.05399609, 0.03125197, -0.00007781149, -0.04214992, -0.044316035, 0.025013437, 0.031466946, 0.0023496088, 0.042693187, -0.046198968, 0.026152546, -0.017578958, 0.023763098, 0.027511515, -0.05229892, -0.005204117, 0.035853546, -0.031919815, -0.027175877, -0.033706605, 0.018576957, -0.0010251165, -0.006808904, 0.009910016, -0.046926413, -0.02833718, 0.0132687995, -0.033933964, 0.06434295, 0.046245363, 0.044698197, 0.041076522, 0.04224362, -0.050834127, 0.0037004466, 0.061506275, -0.018232772, 0.067569405, 0.048701495, 0.042266034, -0.11045008, 0.03627151, -0.07259142, -0.0027725939, 0.040572345, 0.010365194, -0.018683784, 0.004533848, 0.037213936, -0.050944775, 0.07134523, 0.004012727, 0.036228556, -0.013853831, -0.06910639, -0.011394227, -0.012075533, 0.036311198, -0.02587341, -0.04086224, -0.024498813, -0.019423751, -0.022674281, 0.052483488, 0.026303312, -0.051178075, 0.008410645, 0.039851066, -0.028721321, -0.027934253, -0.029567441, 0.054549955, 0.07423011, -0.07211806, 0.015979288, 0.002092099, 0.049062036, 0.025120452, 0.045975365, 0.025024865, -0.04019101, 0.0013054911, -0.0049644294, 0.0065203104, -0.03237452, -0.020704443, 0.028736785, -0.027353559, 0.07551169, 0.0842262, 0.019992182, 0.11138123, -0.028617613, 0.06700691, -0.048681036, -0.008201593, -0.058066163, 0.027867565, 0.07693089, -0.033642102, -0.05855467, -0.08575646, -0.019721355, 0.018443357, -0.0037373751, 0.032450553, -0.0074002664, -0.028135147, 0.046631414, 0.0192969, -0.0071076434, -0.004898368, 0.011896125, -0.026020564, 0.074016415, -0.033884488, -0.07919758, 0.021606326, -0.0142197255, 0.0807476, 0.03722956, -0.0015949347, 0.008076167, -0.009640628, 0.02341143, 0.015375526, -0.059428506, 0.051759534, 0.028049389, 0.07790443, 0.0478649, 0.09191913, -0.055882096, -0.026637457, 0.01236174, -0.0033003334, 0.008522798, 0.027216703, -0.033221588, -0.028086975, -0.11505473, -0.044336796, 0.013873659, 0.03982099, 0.060988583, -0.07439005, 0.01333661, -0.004818605, 0.02561305, -0.059055943, 0.0081638545, -0.032278564, 0.046092775, 0.025316834, -0.046857174, -0.0341012, 0.04379944, -0.029710777, 0.09238533, 0.009769442, 0.018552538, -0.02632421, 0.033739865, -0.022547472, 0.016400741, -0.05336998, -0.012623122, -0.08303054, -0.010368709, 0.01690871, 0.0014627968, -0.050720602, 0.038742293, -0.065664165, -0.10676187, -0.013403239, 0.075702645, -0.055623896, -0.03871971, -0.042371742, 0.03794916, -0.0590573, -0.002583715, -0.029995736, -0.08144537, -0.043295015, -0.034286328, -0.026538746, 0.01953962, 0.08203153, 0.036415525, 0.045531306, 0.004713152, 0.026550433, -0.0055336948, -0.031087596, -0.01923592, -0.1047651, 0.051826596, -0.009522955, 0.0023846119, -0.030824797, 0.0011774554, 0.03384506, 0.010090165, -0.033521466, -0.052155476, 0.0032979914, -0.004305921, -0.08622774, 0.03262125, 0.06332183, 0.00067599304, 0.01989574, 0.04406689, 0.019945903, -0.003796719, 0.00025200442, -0.010055775, 0.04070448, -0.004082432, -0.026942603, 0.11013
assert.True(t, e.NotBlacklisted())
})
t.Run("RealPerson2", func(t *testing.T) {
e := Embedding{0.05743743, 0.06322246, 0.04731233, -0.01582013, -0.014022472, 0.028749773, -0.079572044, 0.010417165, 0.012425559, -0.013655686, -0.05018789, 0.026249807, 0.037449032, 0.051438555, -0.055292394, 0.018136416, 0.035481997, 0.021924775, 0.0449153, -0.046709806, 0.025960712, -0.063309774, 0.037570722, 0.0053055496, 0.07164356, -0.058082405, 0.0017537506, 0.05310737, 0.008366767, 0.001858572, -0.0444527, -0.04880738, -0.033274952, -0.08379612, -0.018964237, -0.0029277618, -0.021386296, 0.0375952, -0.034034044, -0.060141306, -0.0727236, 0.05060482, -0.082235344, 0.04422095, 0.074947104, 0.020209799, 0.0017703519, -0.015411033, 0.012017898, 0.02179871, -0.013231191, -0.08483583, 0.0057485234, -0.019012775, -0.04857383, 0.084329374, 0.009039854, 0.040807534, -0.01692938, 0.0017201875, 0.036594935, -0.08844029, -0.00285713, 0.054565318, -0.047155175, 0.017556412, 0.009818504, 0.113506615, -0.009222306, -0.0004704829, -0.0005908021, 0.023356704, 0.015126567, 0.035651624, 0.025497274, -0.10676789, -0.06828348, 0.112095155, 0.08150907, 0.0007053766, -0.008199173, -0.03852071, 0.029535439, -0.030568745, -0.08978221, -0.004848515, -0.03737906, 0.036448833, 0.004548617, 0.08181337, -0.0087715015, 0.02876368, -0.0060202847, -0.013462866, -0.05015226, -0.03569624, 0.049505115, 0.011994855, -0.010969182, -0.0038046215, -0.004821639, 0.01422656, -0.05946822, -0.013812223, 0.039755587, 0.034921456, -0.05158028, -0.0008751564, -0.031674784, -0.002480392, 0.013109971, -0.017252844, 0.064675435, 0.07642624, 0.08362122, 0.030908048, 0.067052245, 0.021291262, 0.01784629, -0.0507172, 0.052007917, 0.04663132, 0.0064223176, -0.027726524, 0.08033194, 0.038676508, 0.018382965, 0.048913725, -0.022436062, 0.0056725373, -0.040102404, 0.037674494, -0.022307452, -0.03098931, 0.0577183, -0.022725038, -0.0055031423, 0.045162845, -0.014300147, -0.018093627, -0.040114313, -0.051383376, -0.030573318, -0.101557806, -0.008447289, 0.014637746, 0.050047614, -0.011550598, 0.027773034, -0.03317795, -0.048737925, -0.02800452, -0.016925864, -0.037572905, 0.025179392, 0.031473313, -0.010588548, -0.0119464, 0.0057186596, 0.049826983, -0.026282294, -0.00095309806, 0.04696705, -0.0444816, -0.04687481, -0.05711774, 0.07398202, -0.0066416007, -0.016446855, 0.051111717, -0.0419391, -0.013271554, 0.043318115, 0.0012680996, 0.037176434, -0.021031545, 0.03968714, 0.048614495, -0.0058204047, -0.010237752, 0.07029732, 0.018752169, -0.0616816, 0.008854898, 0.06205655, -0.009874518, -0.050585378, 0.012557405, 0.01626891, 0.017797807, -0.03568621, -0.007182635, 0.015247179, 0.02795279, 0.009831571, 0.045041207, -0.055870973, -0.025731718, 0.01907759, -0.034226514, 0.029678043, -0.021697098, -0.020734878, 0.057307053, -0.008900531, -0.019598745, -0.03082626, 0.014591779, 0.06420119, -0.059627317, -0.03732171, 0.016718497, -0.0027331563, 0.013793794, 0.06873449, 0.031878877, -0.025323479, 0.017207827, -0.00025769856, 0.01302832, -0.033877812, 0.1036087, -0.031368185, -0.0062403507, -0.020410763, 0.064998895, -0.049161144, 0.075556606, -0.005309279, 0.024778325, -0.055955246, -0.053952686, 0.04611469, -0.040877238, 0.0366899, 0.05907716, -0.023292458, -0.081198305, 0.078474045, 0.050623402, -0.06233864, 0.07453958, 0.0152983265, -0.04816594, 0.023196025, -0.03438517, -0.024680838, -0.04664079, 0.054698855, 0.0038191404, 0.0024043208, 0.0034349218, -0.03711057, 0.001107596, -0.0028691792, 0.00030419108, 0.037632354, 0.060571946, -0.0946064, 0.042204216, -0.037838906, 0.021439435, -0.076814726, 0.06236704, 0.012242562, -0.061841127, 0.016115433, -0.063648604, 0.025584254, 0.10527214, -0.079565875, 0.008840051, 0.06655628, -0.0051484755, -0.08278825, -0.023478502, 0.0713399, -0.018204115, 0.048147563, -0.12774643, -0.014040633, 0.052833144, 0.0025820592, 0.029898077, 0.09640923, 0.08246072, 0.02947083, -0.015254255, -0.05879318, -0.08034651, -0.03984985, -0.008921548, 0.0035848247, 0.01210673, 0.01669468, -0.011540037, 0.043646365, 0.12930681, 0.028525097, -0.033249676, 0.009854595, 0.020683004, -0.03317388, 0.030189851, -0.037221596, 0.056988247, 0.028217647, -0.098849
assert.True(t, e.NotBlacklisted())
})
}
func TestEmbedding_Unsuitable(t *testing.T) {
t.Run("True", func(t *testing.T) {
e := Embedding{-0.00959064718335867, 0.03787063807249069, -0.0030881548300385475, 0.02789853885769844, 0.017454572021961212, 0.0396987721323967, -0.03091704286634922, 0.005318029318004847, 0.021617550402879715, -0.08214963972568512, -0.003952134400606155, 0.0269720908254385, 0.048880551010370255, -0.03537372127175331, -0.042236171662807465, 0.021553633734583855, 0.03937383368611336, 0.01815507560968399, 0.08373168110847473, -0.11838400363922119, -0.038254253566265106, -0.04993032291531563, 0.07148619741201401, 0.006384310312569141, 0.05344310402870178, -0.027579499408602715, 0.021648988127708435, -0.07013172656297684, -0.06400937587022781, 0.10622639954090118, -0.01507984846830368, -0.02844894863665104, -0.013048898428678513, -0.03571505844593048, -0.022063886746764183, 0.022826166823506355, 0.01703103445470333, 0.00679031852632761, -0.09583312273025513, 0.03446732088923454, -0.045221585780382156, 0.03292521834373474, -0.012820744886994362, 0.06122862547636032, 0.01973198726773262, -0.013975882902741432, 0.027514882385730743, 0.12478502094745636, -0.09630053490400314, -0.008597812615334988, -0.019534612074494362, 0.03927983343601227, 0.04311678186058998, 0.025297729298472404, -0.035719674080610275, 0.05421024188399315, 0.07541341334581375, 0.040334682911634445, -0.0632546916604042, -0.004164006095379591, 0.027950556948781013, 0.017827920615673065, 0.02774866297841072, -0.025094853714108467, 0.00012262807285878807, 0.04165732488036156, -0.03155842795968056, 0.03801475837826729, 0.0031508952379226685, -0.011753040365874767, 0.06262513995170593, 0.05895991623401642, -0.02384188584983349, -0.025149181485176086, -0.016906173899769783, -0.03138834610581398, -0.06759334355592728, 0.018074069172143936, 0.028748946264386177, 0.03350280225276947, 0.001738330232910812, -0.035873714834451675, 0.0050230612978339195, -0.005394259933382273, -0.035111431032419205, 0.005703517701476812, -0.060869812965393066, 0.044046416878700256, 0.05451945215463638, -0.0012109529925510287, 0.04929054155945778, 0.03312966600060463, -0.02503111958503723, -0.0699458047747612, 0.09152142703533173, -0.035196661949157715, -0.02000804804265499, 0.003603762947022915, -0.0549810416996479, 0.041149843484163284, 0.019640415906906128, -0.06913350522518158, -0.08494774252176285, 0.047828249633312225, 0.011485084891319275, 0.11441357433795929, 0.012079037725925446, 0.026444999501109123, 0.008605830371379852, -0.014796323142945766, 0.042191699147224426, 0.0360623262822628, -0.01067506056278944, -0.02117612026631832, -0.0003311904729343951, 0.020912105217576027, 0.02051572874188423, 0.04119933396577835, 0.011461400426924229, 0.02468070574104786, -0.030830683186650276, -0.024522947147488594, 0.07760800421237946, -0.044838037341833115, 0.007875975221395493, 0.03662760183215141, -0.031315844506025314, 0.028968002647161484, -0.007360775955021381, -0.052097514271736145, 0.004892056342214346, 0.0051552411168813705, 0.058972474187612534, -0.05307154729962349, -0.02330617979168892, 0.0560041144490242, -0.06173492223024368, 0.00004632262425730005, 0.007912986911833286, 0.0031768144108355045, -0.08211413770914078, -0.02641596458852291, -0.07240095734596252, -0.04998013749718666, 0.016048355028033257, -0.023686233907938004, 0.08416120707988739, 0.002466161735355854, 0.0017551603959873319, 0.000651281327009201, 0.018105899915099144, -0.05974912270903587, -0.03980677202343941, 0.019075721502304077, 0.0014616637490689754, 0.06682229787111282, 0.02257758192718029, 0.04021807014942169, 0.09144134074449539, 0.020396307110786438, 0.055604636669158936, 0.026022544130682945, -0.03050902672111988, 0.011569516733288765, -0.014519683085381985, 0.0038184933364391327, -0.03115340694785118, 0.029596896842122078, -0.055038318037986755, -0.005584381986409426, -0.015937503427267075, -0.01591162569820881, 0.034234486520290375, 0.010233158245682716, 0.0364360548555851, 0.02957785315811634, 0.038372594863176346, -0.04782934859395027, -0.03462134674191475, -0.0432763509452343, -0.041607096791267395, 0.019871780648827553, -0.026665959507226944, 0.046689242124557495, 0.020541366189718246, 0.03362491
assert.True(t, e.Unsuitable())
})
t.Run("False", func(t *testing.T) {
e := Embedding{0.004882930312305689, -0.028871430084109306, -0.014925234951078892, 0.042015232145786285, 0.03289106860756874, 0.00047218144754879177, -0.04626072198152542, 0.08869951218366623, -0.08738508075475693, 0.041352055966854095, 0.025143291801214218, 0.027804607525467873, 0.03851303085684776, 0.059128664433956146, 0.029246464371681213, -0.01177206914871931, -0.055604543536901474, 0.04581688344478607, -0.021625488996505737, 0.014038625173270702, 0.04526897147297859, -0.003151113400235772, 0.01755913719534874, -0.016582749783992767, -0.04034445434808731, 0.03751881793141365, 0.11246222257614136, 0.025973817333579063, 0.046221256256103516, -0.03560330346226692, 0.010319976136088371, -0.06042899936437607, -0.02092718705534935, -0.015790656208992004, -0.015058585442602634, -0.031521182507276535, -0.014863084070384502, 0.09852202981710434, -0.026713669300079346, -0.09230262786149979, -0.0645485445857048, 0.03376315161585808, -0.016680343076586723, -0.0032860636711120605, 0.0289445947855711, -0.04086116701364517, 0.01185047347098589, -0.03036908246576786, -0.050068069249391556, 0.0013629610184580088, -0.10402216762304306, 0.020886534824967384, 0.06360501796007156, -0.038404129445552826, -0.10402511060237885, 0.019234996289014816, -0.0301763117313385, 0.04926493763923645, -0.014555397443473339, 0.023388627916574478, 0.045102808624506, -0.07065623998641968, 0.01779104769229889, 0.04318133369088173, 0.006222338881343603, -0.03631843626499176, 0.005155006889253855, -0.03126167878508568, 0.02961049973964691, 0.042098451405763626, -0.05473579093813896, -0.030505038797855377, 0.05462753400206566, -0.018857350572943687, -0.013100373558700085, 0.024632159620523453, -0.029910949990153313, -0.06632661819458008, 0.04453831911087036, -0.050670187920331955, 0.037967462092638016, 0.07036780565977097, 0.07603567838668823, 0.02958795428276062, -0.06687693297863007, 0.030427396297454834, 0.040562309324741364, 0.081810861825943, -0.01210289727896452, -0.027030745521187782, -0.08186805993318558, 0.017522599548101425, -0.07442684471607208, 0.032609228044748306, -0.008241117000579834, -0.02420344017446041, 0.010065721347928047, -0.07006815820932388, -0.023965315893292427, -0.095053531229496, -0.0066795386373996735, -0.007384734693914652, 0.017342889681458473, 0.048182494938373566, -0.007601919583976269, -0.034079138189554214, -0.06012185662984848, -0.048203855752944946, -0.00012411877105478197, -0.0702674463391304, -0.053258661180734634, 0.09610331803560257, -0.08409681171178818, 0.0006605522357858717, 0.09284624457359314, -0.003066445467993617, -0.01669788733124733, 0.07133719325065613, -0.001136226230300963, -0.038388170301914215, 0.036363981664180756, -0.03186909109354019, -0.011004592292010784, -0.04703499376773834, -0.033754657953977585, 0.009894444607198238, -0.0651240348815918, 0.07229526340961456, 0.018740307539701462, -0.021803900599479675, 0.012212129309773445, 0.022386791184544563, 0.05509564280509949, -0.002009343821555376, 0.052710991352796555, -0.03911963477730751, 0.0037262304686009884, 0.04576747119426727, -0.06396473199129105, 0.016327453777194023, -0.01841137744486332, 0.08133656531572342, 0.027454890310764313, 0.017934516072273254, -0.05057291314005852, 0.05975693091750145, -0.007352042011916637, 0.00653004040941596, 0.045967090874910355, 0.0636090412735939, -0.04789235070347786, 0.020336657762527466, 0.003387229749932885, -0.036981452256441116, -0.005459815263748169, -0.015007982961833477, -0.046427641063928604, -0.0265751201659441, -0.02166137658059597, -0.04442169517278671, -0.0388776957988739, 0.014315947890281677, 0.07145505398511887, 0.023914091289043427, -0.009579996578395367, 0.000555231177713722, -0.07929696887731552, -0.04671946167945862, 0.04548916965723038, 0.04007089138031006, 0.0777222141623497, -0.05238672345876694, -0.03217660263180733, 0.010117340832948685, -0.07449944317340851, -0.021306153386831284, -0.041546110063791275, 0.004237184766680002, 0.009483197703957558, 0.06297741830348969, -0.000040676473872736096, -0.0072582196444272995, 0.027166014537215233, -0.03531072288751602, 0.04809935390949249, -0
assert.False(t, e.Unsuitable())
})
}
func TestUnmarshalEmbedding(t *testing.T) {
t.Run("success", func(t *testing.T) {
r := UnmarshalEmbedding("[-0.013,-0.031]")
assert.Equal(t, Embedding{-0.013, -0.031}, r)
})
t.Run("no prefix", func(t *testing.T) {
r := UnmarshalEmbedding("-0.013,-0.031]")
assert.Nil(t, r)
})
t.Run("invalid json", func(t *testing.T) {
r := UnmarshalEmbedding("[true, false]")
assert.Equal(t, Embedding{0, 0}, r)
})
}