From 58bc24e4cc09f1a56211c15ee54417efc3b0a782 Mon Sep 17 00:00:00 2001 From: cbbcbail Date: Fri, 9 Aug 2024 16:44:20 -0600 Subject: [PATCH] Minor bug fixes. --- data/Fig2&3-objectives/meanBest.pickle | Bin 1531 -> 1531 bytes data/Fig2&3-objectives/meanGreedy.pickle | Bin 1531 -> 1531 bytes data/solverData.csv | 6 ++++++ jupyter/Fig2&3-objectives.ipynb | 10 ++++------ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/data/Fig2&3-objectives/meanBest.pickle b/data/Fig2&3-objectives/meanBest.pickle index d26812d0028f2cfc546d7fd0d03412c748e26b58..d42bea8a762ede35338713703667116426fce13c 100644 GIT binary patch delta 897 zcmXZTdrVVz90l+`E!SS^EiH&GwWPt#p*++ng0kNijfjP?-Qb2G;G{S$12zlPL?y*4 z4klRS;ede_@WH}UK>@M0OGRVVRd6c-VkRh?B+|)BE39nYAN2h5Ie(nvWINei5~`|A z-d`55!Hy`-lG0uo3*yt}o^G^K0pzlp`C1I(Yc|hq>8HS8XPNT93=E{SOxLWA3Tv^D zZC)Nsm}Xr>Z~z-xQzk7;DY9hod$F)iGNi5D+d%^f~ztM4uND^ zvKrA~;dm3r&*r6qB60ncrfU&h?s)OxraU%SVs+7trK5V~v+(oA!+fwP#1Xqqljxq~ zoAz*j7t-D{roMde4~nzV21b5lz`8(NF3o=hQyFAL#{0T0@ofseX|F?Bp@PxOjkb6gaC&xIR#WGD#BVWe=daVCqWX0)QXf3 zo!3-v@kzZl)3N;U`jzl?Soedua+@Bo`NZKxKHL%Uf3JI2rT5rrGS{X1z+c%zD{}f= z=uhoMiQ3MFL+j<{++r)r^^(h&gNvw9CGcCFKY=AWF9NjK5<7Mb)q-zAb!%7;E;V z-Dsghf=`BY;Rid~yV==?@1=k#{bWo-Cq z1k42qLV*Mrxx5`@l-L+uZro7>-t3TL=crryr-=XQ`mx6{9RPaAEn4 zvHeNOL7=u0qbn*dXufb^Pvs%d^@r7h>cT-Z7uq_Av&==mRvykbK16FfS`AsDFM+xz zj@l{a!r*dSdr=-o1C#GP(T7a)K)+bhQFWICUI~5r2H%2a_g=2s`woHfnvMoXFjf)2 z=F10XTimFmn%N!O5dhDVTit5jGJ3>`t!u6(L2p_@O2Xd^$Ygt_L?7|NY9IPeIZmJg zt)%4Dn`EFE_6$YpTqqUJstOWDOfw?Gt#iW~79@PV9&cM?gCPSayIgEgW?ysM_>l#- zzY5q%8fOFdb5s&_`Y)4%;kvVEXG0hBh}OO&0Qd3XCgVaFG%F<^eoEuOC;P(Z&1V>3 zyeaD~@8iLVm2Hu}NG7EBm1(cZSRf_Q<8oTK;CPavNLt$jqC{~!q1pP4sh{~Me4scO z8qf369{xmzs5J4(BhUEIAnq9Yx!s3S>)YyQwr&QMuqN*IIt8Re%qcp_i*~D$CBzml za$dGAy|rfxOpI0yRaZJuC6!%^MRQ>P2_%&5^PmRoLGJLWFp!2OEv)D~h$Fi|Yfs@q zV2mP9bBO0aooy3Shvjpop0NKO<1d`(+i2s;<{zj~7_YR>r!1oW42Len<3YBCxc$>=4S{SJh1-k#97&=3ffr<{c~B*-0~ZbLMA! z*6lzIyn68BXZKB+F{{pzJ{+3Xb1YSj6iAfhWL-GpLPtxdTecPdg9f`R;sq@@G)!I! z&8{VZT@hzp%J(8&Qc-84o(_%b(*t8&L7*)YJ%4370DgZ{{90~^-ij*ZBRZT2g7ACa zXTM0~gEZZJ?gKdu3VlzfSh&q}>i|x|UOykOvF+G~zxWjgZv2=1X8O$_ZS*UC@A$P} IX(GS-KUoEC`2YX_ diff --git a/data/Fig2&3-objectives/meanGreedy.pickle b/data/Fig2&3-objectives/meanGreedy.pickle index 50c023f68ad8daa36ecf690c5d221b27785bf2b6..724101cc96330959b329a254a116e15ccd5e8622 100644 GIT binary patch delta 897 zcmXZWZA?=K7zN$I0vByZFCJ z32jhz*x6n8f>HC;zj`l%iv`Ko#-C_+&nI=2Vy76neqYVw2vrkTBp*VgSLx z^BI{Xs)WGY+U3Dpc_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djg>vm=x<31IF}@ zxEzf`?~AX;%L;UzGqjmUN}kIX=|9UQHOfvBbBQ0D#V>r(T9fK*+W8ONp`K_QJIF_t zutL)Q>jE9?7-fCe!pD_ne}%)jO7m2NvZRUyZnmkTX!9~1ols?qseDGi6M6ec=mT%4 zTjxg~L@m)4)58p9!zP%5xtfUS<7_a?xhig)$Yi{@*`e6)FdhtTdEA-qgZ=8h9jY=B zh?)4Qg~~DGq6gCpP%QGX3KdMj8pj z&HxYdnGJ}`El*xeXQQWWap>5)1W0y+-?Ir4^=Xpa)YpwHXn#IYHJ&O!Y1;6;rZ1UD zFM67C<}!h6H%`8ZW)0JNImsgSB{SAn==Pl3YPW-Km)$am^^@e*#awT5{RMX6|GK_z Au>b%7 diff --git a/data/solverData.csv b/data/solverData.csv index f2cfe7d..8e3a2dc 100644 --- a/data/solverData.csv +++ b/data/solverData.csv @@ -70,3 +70,9 @@ Uni-criterion: discreteCoverage,greedySwap,1000,10,10,0.10966670885682106,-53.0 Uni-criterion: clusterCenters,worstOfRandom,1000,2,10,0.029493208974599838,11.847265520187392 Uni-criterion: clusterCenters,bestOfRandom,1000,2,10,0.02857504179701209,2.789513312747127 Uni-criterion: clusterCenters,greedySwap,1000,2,10,0.13878262508660555,0.7724079671652213 +"Uni-criterion: preserveMetric, mean",worstOfRandom,1000,10,10,0.02800250006839633,9.50451408816041 +"Uni-criterion: preserveMetric, mean",bestOfRandom,1000,10,10,0.02774458285421133,1.4512032863232234 +"Uni-criterion: preserveMetric, mean",greedySwap,1000,10,10,0.13165183318778872,0.5215736802170967 +"Uni-criterion: preserveMetric, mean",worstOfRandom,1000,10,10,0.031927124597132206,9.503260009237106 +"Uni-criterion: preserveMetric, mean",bestOfRandom,1000,10,10,0.027917416766285896,1.460277122561562 +"Uni-criterion: preserveMetric, mean",greedySwap,1000,10,10,0.132963459007442,0.5640211475433015 diff --git a/jupyter/Fig2&3-objectives.ipynb b/jupyter/Fig2&3-objectives.ipynb index 69a7098..8dd31ce 100644 --- a/jupyter/Fig2&3-objectives.ipynb +++ b/jupyter/Fig2&3-objectives.ipynb @@ -28,9 +28,7 @@ "import numpy as np\n", "import seaborn as sns \n", "\n", - "from sklearn.cluster import KMeans\n", - "\n", - "# Local\n", + "# Local files\n", "import flexibleSubsetSelection as fss\n", "\n", "# Initialize notebook settings\n", @@ -58,11 +56,11 @@ "source": [ "directory = \"Fig2&3-objectives\" # data directory for this notebook\n", "seed = 123456789 # random seed for replicability\n", - "fss.logger.setup(level=logging.WARNING) # set logging level for the package\n", + "fss.logger.setup(level=logging.DEBUG) # set logging level for the package\n", "subsetSize = 10 # size of subset selected\n", "\n", "firstDataset = fss.Dataset(randTypes=\"multimodal\", size=(1000, 10), seed=seed)\n", - "firstDataset.save(f\"{directory}/firstSetFull\")" + "firstDataset.save(name=\"firstSetFull\", directory=Path(\"..\")/\"data\"/directory)" ] }, { @@ -488,7 +486,7 @@ "subsetSize = 10 # size of subset selected\n", "\n", "secondDataset = fss.Dataset(randTypes=\"blobs\", size=(1000, 2), seed=seed)\n", - "secondDataset.save(f\"{directory}/secondSetFull\")" + "secondDataset.save(name=\"secondSetFull\", directory=Path(\"..\")/\"data\"/directory)" ] }, {