diff --git a/data/Fig2&3-objectives/clusterBest.pickle b/data/Fig2&3-objectives/clusterBest.pickle index 3cdb3d1..405aa41 100644 Binary files a/data/Fig2&3-objectives/clusterBest.pickle and b/data/Fig2&3-objectives/clusterBest.pickle differ diff --git a/data/Fig2&3-objectives/clusterGreedy.pickle b/data/Fig2&3-objectives/clusterGreedy.pickle index 58188af..5147b12 100644 Binary files a/data/Fig2&3-objectives/clusterGreedy.pickle and b/data/Fig2&3-objectives/clusterGreedy.pickle differ diff --git a/data/Fig2&3-objectives/clusterWorst.pickle b/data/Fig2&3-objectives/clusterWorst.pickle index 518f675..a58005f 100644 Binary files a/data/Fig2&3-objectives/clusterWorst.pickle and b/data/Fig2&3-objectives/clusterWorst.pickle differ diff --git a/data/Fig2&3-objectives/coverageBest.pickle b/data/Fig2&3-objectives/coverageBest.pickle index 58c291d..66ffaf6 100644 Binary files a/data/Fig2&3-objectives/coverageBest.pickle and b/data/Fig2&3-objectives/coverageBest.pickle differ diff --git a/data/Fig2&3-objectives/coverageGreedy.pickle b/data/Fig2&3-objectives/coverageGreedy.pickle index a41862b..b7200d1 100644 Binary files a/data/Fig2&3-objectives/coverageGreedy.pickle and b/data/Fig2&3-objectives/coverageGreedy.pickle differ diff --git a/data/Fig2&3-objectives/coverageWorst.pickle b/data/Fig2&3-objectives/coverageWorst.pickle index 2e6a8df..fda4b41 100644 Binary files a/data/Fig2&3-objectives/coverageWorst.pickle and b/data/Fig2&3-objectives/coverageWorst.pickle differ diff --git a/data/Fig2&3-objectives/crossingsBest.pickle b/data/Fig2&3-objectives/crossingsBest.pickle index 176eac6..0002926 100644 Binary files a/data/Fig2&3-objectives/crossingsBest.pickle and b/data/Fig2&3-objectives/crossingsBest.pickle differ diff --git a/data/Fig2&3-objectives/crossingsGreedy.pickle b/data/Fig2&3-objectives/crossingsGreedy.pickle index 765abdf..5c6c53f 100644 Binary files a/data/Fig2&3-objectives/crossingsGreedy.pickle and b/data/Fig2&3-objectives/crossingsGreedy.pickle differ diff --git a/data/Fig2&3-objectives/crossingsWorst.pickle b/data/Fig2&3-objectives/crossingsWorst.pickle index c79566f..c60de22 100644 Binary files a/data/Fig2&3-objectives/crossingsWorst.pickle and b/data/Fig2&3-objectives/crossingsWorst.pickle differ diff --git a/data/Fig2&3-objectives/distinctnessBest.pickle b/data/Fig2&3-objectives/distinctnessBest.pickle index b9d7990..7ad945e 100644 Binary files a/data/Fig2&3-objectives/distinctnessBest.pickle and b/data/Fig2&3-objectives/distinctnessBest.pickle differ diff --git a/data/Fig2&3-objectives/distinctnessGreedy.pickle b/data/Fig2&3-objectives/distinctnessGreedy.pickle index 98bf31e..bb9b92d 100644 Binary files a/data/Fig2&3-objectives/distinctnessGreedy.pickle and b/data/Fig2&3-objectives/distinctnessGreedy.pickle differ diff --git a/data/Fig2&3-objectives/distinctnessWorst.pickle b/data/Fig2&3-objectives/distinctnessWorst.pickle index 16e24c4..a790799 100644 Binary files a/data/Fig2&3-objectives/distinctnessWorst.pickle and b/data/Fig2&3-objectives/distinctnessWorst.pickle differ diff --git a/data/Fig2&3-objectives/distributionBest.pickle b/data/Fig2&3-objectives/distributionBest.pickle index 4c03567..22b5d27 100644 Binary files a/data/Fig2&3-objectives/distributionBest.pickle and b/data/Fig2&3-objectives/distributionBest.pickle differ diff --git a/data/Fig2&3-objectives/distributionGreedy.pickle b/data/Fig2&3-objectives/distributionGreedy.pickle index be1773c..8abfa5a 100644 Binary files a/data/Fig2&3-objectives/distributionGreedy.pickle and b/data/Fig2&3-objectives/distributionGreedy.pickle differ diff --git a/data/Fig2&3-objectives/distributionWorst.pickle b/data/Fig2&3-objectives/distributionWorst.pickle index 11899af..223ebd3 100644 Binary files a/data/Fig2&3-objectives/distributionWorst.pickle and b/data/Fig2&3-objectives/distributionWorst.pickle differ diff --git a/data/Fig2&3-objectives/meanBest.pickle b/data/Fig2&3-objectives/meanBest.pickle index df47208..602c561 100644 Binary files a/data/Fig2&3-objectives/meanBest.pickle and b/data/Fig2&3-objectives/meanBest.pickle differ diff --git a/data/Fig2&3-objectives/meanGreedy.pickle b/data/Fig2&3-objectives/meanGreedy.pickle index c4a9ca1..79e413c 100644 Binary files a/data/Fig2&3-objectives/meanGreedy.pickle and b/data/Fig2&3-objectives/meanGreedy.pickle differ diff --git a/data/Fig2&3-objectives/rangeBest.pickle b/data/Fig2&3-objectives/rangeBest.pickle index 51d18fa..4085efc 100644 Binary files a/data/Fig2&3-objectives/rangeBest.pickle and b/data/Fig2&3-objectives/rangeBest.pickle differ diff --git a/data/Fig2&3-objectives/rangeGreedy.pickle b/data/Fig2&3-objectives/rangeGreedy.pickle index 66b4a7a..20d4242 100644 Binary files a/data/Fig2&3-objectives/rangeGreedy.pickle and b/data/Fig2&3-objectives/rangeGreedy.pickle differ diff --git a/data/Fig2&3-objectives/rangeWorst.pickle b/data/Fig2&3-objectives/rangeWorst.pickle index d44d4dc..4c15f91 100644 Binary files a/data/Fig2&3-objectives/rangeWorst.pickle and b/data/Fig2&3-objectives/rangeWorst.pickle differ diff --git a/data/Fig2&3-objectives/secondSetFull.pickle b/data/Fig2&3-objectives/secondSetFull.pickle index b551ad1..9c3b3de 100644 Binary files a/data/Fig2&3-objectives/secondSetFull.pickle and b/data/Fig2&3-objectives/secondSetFull.pickle differ diff --git a/data/Fig2&3-objectives/spreadBest.pickle b/data/Fig2&3-objectives/spreadBest.pickle index 1b4a8ec..48ee6cb 100644 Binary files a/data/Fig2&3-objectives/spreadBest.pickle and b/data/Fig2&3-objectives/spreadBest.pickle differ diff --git a/data/Fig2&3-objectives/spreadGreedy.pickle b/data/Fig2&3-objectives/spreadGreedy.pickle index 7c48d75..1d7f0df 100644 Binary files a/data/Fig2&3-objectives/spreadGreedy.pickle and b/data/Fig2&3-objectives/spreadGreedy.pickle differ diff --git a/data/Fig2&3-objectives/spreadWorst.pickle b/data/Fig2&3-objectives/spreadWorst.pickle index dd41c84..a68d5ba 100644 Binary files a/data/Fig2&3-objectives/spreadWorst.pickle and b/data/Fig2&3-objectives/spreadWorst.pickle differ diff --git a/data/Fig2&3-objectives/varianceBest.pickle b/data/Fig2&3-objectives/varianceBest.pickle index ebc21c1..b376a80 100644 Binary files a/data/Fig2&3-objectives/varianceBest.pickle and b/data/Fig2&3-objectives/varianceBest.pickle differ diff --git a/data/Fig2&3-objectives/varianceGreedy.pickle b/data/Fig2&3-objectives/varianceGreedy.pickle index b9b57a8..d8385cf 100644 Binary files a/data/Fig2&3-objectives/varianceGreedy.pickle and b/data/Fig2&3-objectives/varianceGreedy.pickle differ diff --git a/data/Fig2&3-objectives/varianceWorst.pickle b/data/Fig2&3-objectives/varianceWorst.pickle index 14a5d18..219520b 100644 Binary files a/data/Fig2&3-objectives/varianceWorst.pickle and b/data/Fig2&3-objectives/varianceWorst.pickle differ diff --git a/data/solverLog.csv b/data/solverLog.csv index 1f98c96..f3e9505 100644 --- a/data/solverLog.csv +++ b/data/solverLog.csv @@ -167,3 +167,30 @@ Uni-criterion: clusterCenters,greedySwap,1000,2,10,0.13956262497231364,0.3799413 "Uni-criterion: distinctness, distances",greedyMixed,200,2,21,0.04174462519586086,-47.546951611341385 "Uni-criterion: distinctness, distances",greedyMixed,200,2,13,0.021749832667410374,-51.19458441796628 "Uni-criterion: distinctness, distances",greedyMixed,200,2,108,0.24733683420345187,-88.67659171843289 +"Uni-criterion: preserveMetric, mean",worstOfRandom,1000,10,10,0.030223750043660402,10.238990843936536 +"Uni-criterion: preserveMetric, mean",bestOfRandom,1000,10,10,0.027270665857940912,2.1312416913944023 +"Uni-criterion: preserveMetric, mean",greedySwap,1000,10,10,0.13102687522768974,0.7377090333370071 +"Uni-criterion: preserveMetric, range",worstOfRandom,1000,10,10,0.026818291749805212,94.54384705600812 +"Uni-criterion: preserveMetric, range",bestOfRandom,1000,10,10,0.025452374946326017,61.11657099954919 +"Uni-criterion: preserveMetric, range",greedySwap,1000,10,10,0.11164345825091004,20.589244854584848 +"Uni-criterion: preserveMetric, variance",worstOfRandom,1000,10,10,0.03542362526059151,40.42561965700492 +"Uni-criterion: preserveMetric, variance",bestOfRandom,1000,10,10,0.03290425008162856,6.686596964682314 +"Uni-criterion: preserveMetric, variance",greedySwap,1000,10,10,0.1810527089983225,1.3867190085569763 +Uni-criterion: pcpLineCrossings,worstOfRandom,1000,10,10,0.15042591700330377,254.0 +Uni-criterion: pcpLineCrossings,bestOfRandom,1000,10,10,0.14716304186731577,136.0 +Uni-criterion: pcpLineCrossings,greedySwap,1000,10,10,1.3210318749770522,70.0 +Uni-criterion: discreteCoverage,worstOfRandom,1000,10,10,0.02551591582596302,-30.0 +Uni-criterion: discreteCoverage,bestOfRandom,1000,10,10,0.024775667116045952,-43.0 +Uni-criterion: discreteCoverage,greedySwap,1000,10,10,0.10554337501525879,-53.0 +"Uni-criterion: preserveMetric, discreteDistribution",worstOfRandom,1000,10,10,0.029606208205223083,6.424000000000001 +"Uni-criterion: preserveMetric, discreteDistribution",bestOfRandom,1000,10,10,0.028771957848221064,3.118 +"Uni-criterion: preserveMetric, discreteDistribution",greedySwap,1000,10,10,0.13506262470036745,1.806 +"Uni-criterion: distinctness, distances",worstOfRandom,1000,2,10,0.029963584151118994,-3.656264863017513 +"Uni-criterion: distinctness, distances",bestOfRandom,1000,2,10,0.03132283268496394,-21.92100966579501 +"Uni-criterion: distinctness, distances",greedySwap,1000,2,10,0.15366837522014976,-42.444218706875375 +"Uni-criterion: spread, distances",worstOfRandom,1000,2,10,0.0320572080090642,-99.94887059504178 +"Uni-criterion: spread, distances",bestOfRandom,1000,2,10,0.030500834342092276,-455.6043820022457 +"Uni-criterion: spread, distances",greedySwap,1000,2,10,0.14448095811530948,-798.2870616926094 +Uni-criterion: clusterCenters,worstOfRandom,1000,2,10,0.028890457935631275,10.970521918610308 +Uni-criterion: clusterCenters,bestOfRandom,1000,2,10,0.02879470819607377,2.513555554071612 +Uni-criterion: clusterCenters,greedySwap,1000,2,10,0.13824820891022682,0.7651631287086615 diff --git a/figures/Fig2&3-objectives/objectives-1.pdf b/figures/Fig2&3-objectives/objectives-1.pdf index 74b90a7..58619cb 100644 Binary files a/figures/Fig2&3-objectives/objectives-1.pdf and b/figures/Fig2&3-objectives/objectives-1.pdf differ diff --git a/figures/Fig2&3-objectives/objectives-2.pdf b/figures/Fig2&3-objectives/objectives-2.pdf index 20a3764..abfb0e5 100644 Binary files a/figures/Fig2&3-objectives/objectives-2.pdf and b/figures/Fig2&3-objectives/objectives-2.pdf differ diff --git a/flexibleSubsetSelection/algorithm.py b/flexibleSubsetSelection/algorithm.py index cbf8ae9..068e67a 100644 --- a/flexibleSubsetSelection/algorithm.py +++ b/flexibleSubsetSelection/algorithm.py @@ -39,8 +39,9 @@ def createEnvironment(outputFlag: int = 0): Arg: outputFlag: Flag for Gurobi output. """ environment = gp.Env(empty=True) - environment.setParam("OutputFlag", 1) + environment.setParam("OutputFlag", outputFlag) environment.setParam("LogFile", "../data/gurobiLog.log") + environment.setParam("ConcurrentMIP", 2) environment.start() return environment diff --git a/flexibleSubsetSelection/solver.py b/flexibleSubsetSelection/solver.py index 8d237bd..2f54f20 100644 --- a/flexibleSubsetSelection/solver.py +++ b/flexibleSubsetSelection/solver.py @@ -12,6 +12,7 @@ from . import sets from .timer import Timer + # --- Solver ------------------------------------------------------------------- class Solver(): diff --git a/jupyter/Fig2&3-objectives.ipynb b/jupyter/Fig2&3-objectives.ipynb index 84daedf..e826dbb 100644 --- a/jupyter/Fig2&3-objectives.ipynb +++ b/jupyter/Fig2&3-objectives.ipynb @@ -32,7 +32,7 @@ "# Initialize notebook settings\n", "sns.set_theme() # set seaborn theme\n", "matplotlib_inline.backend_inline.set_matplotlib_formats('svg') # vector plots\n", - "%matplotlib inline \n", + "%matplotlib inline\n", "%load_ext autoreload\n", "%autoreload 2" ] @@ -384,7 +384,7 @@ "source": [ "# Initialize color and plot settings\n", "color = fss.plot.Color()\n", - "fss.plot.initialize(color)\n", + "fss.plot.initialize(color, font=\"DejaVu Sans\")\n", "\n", "nrows = 6\n", "ncols = 4\n", @@ -418,7 +418,7 @@ " [\"loss\"]],\n", " [[\"distribution\"], [\"distribution\"], [\"distribution\"], [\"loss\"]]]\n", "\n", - "fig, axs = plt.subplots(nrows=nrows, ncols=ncols, figsize=(6.25, 4.5), \n", + "fig, axs = plt.subplots(nrows=nrows, ncols=ncols, figsize=(8, 6), \n", " gridspec_kw={'width_ratios': [1, 1, 1, 0.25]})\n", "\n", "for i in range(nrows): # Loop through rows\n", @@ -666,7 +666,7 @@ " [subsetClusterWorst, subsetClusterBest, subsetClusterGreedy, None]]\n", " \n", "# Adjust the figsize to make room for the plots\n", - "fig, axs = plt.subplots(nrows=nrows, ncols=ncols, figsize=(6.25, 3.5), \n", + "fig, axs = plt.subplots(nrows=nrows, ncols=ncols, figsize=(8, 5), \n", " gridspec_kw={'width_ratios': [1, 1, 1, 0.5]})\n", "\n", "for i in range(nrows): # Loop through rows\n", diff --git a/jupyter/_config.yml b/jupyter/_config.yml index c32bdbe..7a6b6f0 100644 --- a/jupyter/_config.yml +++ b/jupyter/_config.yml @@ -26,3 +26,4 @@ parse: myst_enable_extensions: - dollarmath - colon_fence + - amsmath