Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbcbail committed Jul 19, 2024
1 parent f76ee85 commit fbb16ff
Show file tree
Hide file tree
Showing 34 changed files with 35 additions and 5 deletions.
Binary file modified data/Fig2&3-objectives/clusterBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/clusterGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/clusterWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/coverageBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/coverageGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/coverageWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/crossingsBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/crossingsGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/crossingsWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distinctnessBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distinctnessGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distinctnessWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distributionBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distributionGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/distributionWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/meanBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/meanGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/rangeBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/rangeGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/rangeWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/secondSetFull.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/spreadBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/spreadGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/spreadWorst.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/varianceBest.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/varianceGreedy.pickle
Binary file not shown.
Binary file modified data/Fig2&3-objectives/varianceWorst.pickle
Binary file not shown.
27 changes: 27 additions & 0 deletions data/solverLog.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Binary file modified figures/Fig2&3-objectives/objectives-1.pdf
Binary file not shown.
Binary file modified figures/Fig2&3-objectives/objectives-2.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion flexibleSubsetSelection/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions flexibleSubsetSelection/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from . import sets
from .timer import Timer


# --- Solver -------------------------------------------------------------------

class Solver():
Expand Down
8 changes: 4 additions & 4 deletions jupyter/Fig2&3-objectives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions jupyter/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ parse:
myst_enable_extensions:
- dollarmath
- colon_fence
- amsmath

0 comments on commit fbb16ff

Please sign in to comment.