-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulated annealing for SDP #42
Merged
TolisChal
merged 44 commits into
GeomScale:develop
from
panagiotisrep:simulated-annealing-spectrahedra
Sep 24, 2020
Merged
Simulated annealing for SDP #42
TolisChal
merged 44 commits into
GeomScale:develop
from
panagiotisrep:simulated-annealing-spectrahedra
Sep 24, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vissarion
changed the title
Simulated annealing spectrahedra
Simulated annealing for SDP
Feb 19, 2020
vissarion
force-pushed
the
develop
branch
11 times, most recently
from
February 27, 2020 15:06
e4ac563
to
ca784f5
Compare
- create class spectrahedron - expose function to write sdpa format files in R
- fix examples - add data for example - add roxygen comments
- add copyrights headers - add test that writes and reads a sdpa format file - add the test in test/CMakeLists.txt
- create folder examples in root - add an example main to read / write sdpa format files
- move in new folder spectrahedron.h, LMI.h - update CMakeLists.txt in folder examples, tests - update Makevars in R-prog/src and in cran_gen - add documentation for sdpa file example
fix headers
- rename module in polytopes_modules.cpp to "polytopes" - rename module in spectrahedron_module.cpp to "spectrahedron" - fix dates in copyrights headers in files - add a newline in end of file spectrahedron.h
Also fix parameters documentation in R for functions - readSDPAFormatFile - loadSDPAFormatFile - writeSDPAFormatFile
- rename SPECTRAHEDRON typedef to Spectrahedron - remove unneeded class _Spectrahedron in spectrahedron.cpp
# Conflicts: # R-proj/src/Makevars # R-proj/src/Makevars.win # cran_gen/Makevars # cran_gen/Makevars.win # test/CMakeLists.txt
…mation into simulated-annealing-spectrahedra
Accept everything as was in upstream/develop
causes error with R interface
required by spectrahedron.h
…' into simulated-annealing-spectrahedra
vissarion
approved these changes
Sep 8, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @panagiotisrep !
This was referenced Sep 18, 2020
…d-annealing-spectrahedra # Conflicts: # R-proj/src/spectrahedron.cpp
TolisChal
approved these changes
Sep 24, 2020
vissarion
pushed a commit
that referenced
this pull request
Oct 26, 2020
* expose Spectrahedron interface to R - create class spectrahedron - expose function to write sdpa format files in R * expose read_sdpa function to R and documentation * R documentation and examples - fix examples - add data for example - add roxygen comments * tests for sdpa format manager - add copyrights headers - add test that writes and reads a sdpa format file - add the test in test/CMakeLists.txt * add example code for sdpa files - create folder examples in root - add an example main to read / write sdpa format files * fix file format * fix file encoding * use soft wrap with lines * create folder spectrahedra - move in new folder spectrahedron.h, LMI.h - update CMakeLists.txt in folder examples, tests - update Makevars in R-prog/src and in cran_gen - add documentation for sdpa file example * examples/spectrahedra documentation * examples/spectrahedra documentation fix headers * rename R modules - rename module in polytopes_modules.cpp to "polytopes" - rename module in spectrahedron_module.cpp to "spectrahedron" - fix dates in copyrights headers in files - add a newline in end of file spectrahedron.h * make LMI::getMatrices() return std::vector const & Also fix parameters documentation in R for functions - readSDPAFormatFile - loadSDPAFormatFile - writeSDPAFormatFile * rename typedefs in spectrahedron.cpp - rename SPECTRAHEDRON typedef to Spectrahedron - remove unneeded class _Spectrahedron in spectrahedron.cpp * SDP Solver Simulated annealing for spectrahedra - add libraries spectra, arpack - add random walks Hamiltonian monte carlo with reflections under Boltzmann distribution and coordinate Hit and Run - in folder matrices there are the classes solving the required eigenvalue problems * fix test/SDP/CMakeLists.txt to include dependencies * fix test/SDP/CMakeLists.txt fix libgfortran * refactor - rename folder matrices to matrix_operations - refactor boltzmann_hmc_walk.hpp to follow the style of the rest random walks - in boost_random_number_generator.hpp create a default (empty) constructor * add example boltzmannHmcWalk.cpp - update examples/spectrahedron/README.md - remove files CoordinateDirectionsHitAndRun_RandomWalk.h and optimization/SDPA-FormatManager.h (duplicate) * fix type * add examples/spectrahedra/semidefiniteProgramming.cpp - fix bug in SimulatedAnnealing.h (minor - missed from previous refactor) - update examples/spectrahedra/readme.md - EigenvaluesProblems.h when calling arpack method findEigenvalues() make sure ncv <= number of rows of matrix * refactor - rename files to match package - in the simulated_annealing.hpp destroy the class and expose the functionality as free functions - update examples and README.md * add tests Add tests in folder tests/SDP to test the sdp solver and the boundary oracles.They have their own CMakeLists.txt * fix README.mde compilation instructions * fix README.md * fix include * fix errors from previous merge Accept everything as was in upstream/develop * newline in end of file * remove wrong #include causes error with R interface * add #include required by spectrahedron.h * add \dontrun{} in R example * try fix in cmakefiles * Create testSDP.yml * try fix in cmakefiles * try fix in cmakefiles * try fix in cmakefiles * fix CMakeLists.txt and readne.md * fix cmakelists (#2) Co-authored-by: Tolis Chalkis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The improved version of the simulated annealing algorithm for convex optimization from Kalai and Vempala, “Simulated Annealing for Convex Optimization”, for spectrahedra (semidefinite programming). This PR:
-- Implements the exact Hamiltonian Monte Carlo for sampling from the exponential distribution.
-- Employs
Eigen
,Spectra
andarpackpp
to implement the boundary oracle (which reduces to a Quadratic Eigenvalue Problem).-- Uses the deterministic cooling scheme of [Kalai and Vempala, “Simulated Annealing for Convex Optimization”].
-- Does not applies the isotropization step given in [Kalai and Vempala, “Simulated Annealing for Convex Optimization”].
Some possible next steps based on this PR:
-- Fix numerical issues close to the boundary.
-- Introduce an adaptive version of Hamiltonian Monte Carlo to reduce the average number of reflections.
-- Exploit other distributions to select a point on the trajectory in each step of the random walk.
-- Introduce a more sophisticated cooling scheme.
-- Test various isotropization techniques.
More info on implementation / testing here.