Skip to content

aguilarmadeira/mixed-spaces-supplementary

Repository files navigation

Mixed spaces — supplementary material

Reproducibility tests License: MIT

Supplementary code for:

J. F. A. Madeira, Mixed-Variable Optimisation as a Metric Product Space: Transient Categorical Geometry and a Hierarchy of Local Optimality, manuscript JOGO-D-26-00103, revised version.

The repository supports two parts of the manuscript:

  • Appendix A / Proposition 5.4: deterministic generation and independent verification of minimal covering families of cyclic orderings.
  • Section 6.3 / Table 4 / Figure 6: the controlled mixed-variable computational illustration under categorical relabellings.

Repository structure

coverings/
  generate_coverings.py   Python generator for minimal covering families
  verify_coverings.py     Independent verification of Appendix A.3
  generate_coverings.m    MATLAB/Octave generator
  verify_coverings.m      MATLAB/Octave verification
experiment/
  mixed_experiment.py     Python reference implementation for Section 6.3
  mixed_experiment.m      MATLAB/Octave implementation
  make_figure.py          Regenerates Figure 6
  fig_convergence_A.pdf   Figure used in the revised manuscript
tests/
  test_repository.py      Coverage and Table 4 regression tests

Quick start

Python 3.10 or later is recommended. The numerical experiment and covering tools use only the standard library.

# Verify the explicit Appendix A.3 families
python coverings/verify_coverings.py

# Generate minimal covering families for k = 3,...,10
python coverings/generate_coverings.py

# Generate one family
python coverings/generate_coverings.py 12 12

# Reproduce Table 4 and write JSON results
python experiment/mixed_experiment.py --output-dir results --validate

To regenerate Figure 6:

python -m pip install -r requirements-figure.txt
python experiment/make_figure.py \
  --input results/traces_A.json \
  --output results/fig_convergence_A.pdf

MATLAB / GNU Octave:

addpath('coverings', 'experiment')
verify_coverings
cycles = generate_coverings(8)
mixed_experiment

Expected Table 4 output

The Python reference implementation reproduces the manuscript values:

Instance Treatment Success Final value (mean ± std) Distinct evaluations
A integer adjacency 0.175 3.950 ± 2.487 95
A full polling 1.000 0.000 ± 0.000 189
A rotating cyclic 1.000 0.000 ± 0.000 124
A random neighbour 1.000 0.024 ± 0.083 553
B integer adjacency 0.250 3.913 ± 2.552 87
B full polling 1.000 0.000 ± 0.000 164
B rotating cyclic 1.000 0.000 ± 0.000 135
B random neighbour 1.000 0.000 ± 0.000 197

Reproducibility details

  • The 40 relabellings are fixed explicitly in both implementations.
  • Every run starts at the label carrying the same underlying category.
  • Distinct function evaluations are counted through a cache; repeated trial requests do not increase the count.
  • Full polling and rotating cyclic termination certificates are asserted programmatically.
  • The deterministic treatments produce the same reported rows in Python and MATLAB/Octave.
  • The random baseline uses different portable random generators in the two languages. Table 4 reports the Python values.
  • Figure rendering can vary slightly with the Matplotlib version, but it is generated from the same saved trace data.

Covering construction

For a categorical set of size k, the minimum family size is

[ M = \left\lceil\frac{k-1}{2}\right\rceil. ]

  • For odd k, the generator uses a Walecki Hamiltonian decomposition.
  • For even k, it uses the round-robin circle method and pairs perfect matchings to form Hamiltonian cycles.

The verifier checks minimal family size, validity of every permutation, full pairwise coverage, the repetition count in Remark 5.6, and agreement of the k=8 family with the Section 6.3 schedule.

Automated checks

python -m unittest discover -s tests -v

GitHub Actions runs these checks on Python 3.10, 3.11, and 3.13 and regenerates Figure 6 as an artifact.

Citation

Use GitHub's Cite this repository button, generated from CITATION.cff. A software DOI should be added after the first archived GitHub release.

License

MIT. See LICENSE.

Backward compatibility

The original root-level commands (generate_orderings.py, verify_orderings.py and their MATLAB counterparts) are retained as thin compatibility wrappers. New work should use the scripts in coverings/.

About

Mixed-variable optimisation as a metric product space — supplementary code for a manuscript on transient categorical geometry and a hierarchy of local optimality.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages