-
Notifications
You must be signed in to change notification settings - Fork 113
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
Feature/sampling correlation matrices #233
Feature/sampling correlation matrices #233
Conversation
…uphuocle/volesti into feature/sampling_correlation_matrices
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #233 +/- ##
===========================================
+ Coverage 53.58% 54.22% +0.63%
===========================================
Files 101 97 -4
Lines 5931 5791 -140
Branches 2766 2679 -87
===========================================
- Hits 3178 3140 -38
- Misses 967 1028 +61
+ Partials 1786 1623 -163
|
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! I have a few comments.
…ance) and change order of vector coefficients of CorreSpectra to lower triangular part (to homogenize with CorreSpectra_MT)
… those functions in test file
Thanks for addressing the comments. Please fix some conflicts and merge with current develop to let the tests run. Then this PR could be merged! |
* first commit * draft * draft * update some code * finish Point_matrix.cpp * change name: CorreSpectra.cpp * update * TODO * change TODO * update * update * update * update * clean * update * correlation class * billiard walk * eigenvaluescorrelation.h * update * update * update * update * update * update * faster billiard walk * add missing CMake file * start hmc * add old sampler file * Revert "add old sampler file" This reverts commit 1b2f299. * Revert "start hmc" This reverts commit 642d4e1. * revert commits of HMC walk * clean unecessary code and fix minor changes * New class CorreSpectra inherits from Spectrahedron * add first code of ReHMC with leap frog for Gaussian sampling for testing * relocate files: * sample_correlation_matrices.hpp -> sampling/ * test.hpp -> test/sampling_correlation_matrices_test.cpp * ReHMC.cpp -> random_walks/gaussian_ReHMC_correlation.hpp * move test files to test folder and add more test * change ReHMC code to WalkType class to suit volesti * move content of EigenvaluesCorrelation to EigenvaluesProblems remove temporary HCM walk change Walk Length of test to 1 * simplify code of corre_spectra.hpp * new correlation matrix class : CorreSpectra2 (testing: run for n=3, bug for n=10) * fix bugs of CorreSpectra2 for BilliardWalk * add some more tests + optimize reflection of CorreSpectra2 * fix some bugs of Spectrahedra to run BallWalk and AcceleratedBilliardWalk * New changes: * Change name of CorreSpectr2 -> CorreSpectra_MT * Added and tested BallWalk for CorreSpectra_MT * Compute diameter: remove NT(6) * Remove commented code * remove redundant comments * add examples for sampling correlation matrices and remove redundant functions in tests * added RDHR walk + fixed small changes * remove redundant files in examples * update CMakeLists in examples to enable MKL * change MKL linking in examples' CMakeLists.txt * change const specifier in several functions + readded const for Polytope arguments in functions of uniform_ball_walk.hpp * add const specifier to is_in in spectrahedron class (required for Ball Walk) * newline end of gitignore * add copyright to examples * format uniform_billiard_walk.hpp (indent, trailing spaces,...) * change header guards of convex_bodies correlation_matrices files * fix bugs in Spectrahedron line_intersect (wrong sign of negative distance) and change order of vector coefficients of CorreSpectra to lower triangular part (to homogenize with CorreSpectra_MT) * homogenize check_output in tests for CorreSpectra and CorreSpectra_MT * change names of CorreSpectra classes to CorrelationSpectrahedron * change include path of CorrelationSpectrahedron in random walks * format and optimize (minor) sampling/sphere.hpp * add Copyright headers * format style corre_matrix.hpp * format style CorrelationSpectrahedron * format style CorrelationSpectrahedron classes * move direct (old) sampling functions to examples and remove tests for those functions in test file * remove old tests from CMakeLists.txt * add const keywords back to RDHR Walk * fix bugs in corre_matrix * add const keyword back to gaussian random point generator Co-authored-by: phuoc <huu-phuoc.le@lip6.fr> Co-authored-by: Vissarion Fisikopoulos <fisikop@gmail.com>
* first commit * draft * draft * update some code * finish Point_matrix.cpp * change name: CorreSpectra.cpp * update * TODO * change TODO * update * update * update * update * clean * update * correlation class * billiard walk * eigenvaluescorrelation.h * update * update * update * update * update * update * faster billiard walk * add missing CMake file * start hmc * add old sampler file * Revert "add old sampler file" This reverts commit 1b2f299. * Revert "start hmc" This reverts commit 642d4e1. * revert commits of HMC walk * clean unecessary code and fix minor changes * New class CorreSpectra inherits from Spectrahedron * add first code of ReHMC with leap frog for Gaussian sampling for testing * relocate files: * sample_correlation_matrices.hpp -> sampling/ * test.hpp -> test/sampling_correlation_matrices_test.cpp * ReHMC.cpp -> random_walks/gaussian_ReHMC_correlation.hpp * move test files to test folder and add more test * change ReHMC code to WalkType class to suit volesti * move content of EigenvaluesCorrelation to EigenvaluesProblems remove temporary HCM walk change Walk Length of test to 1 * simplify code of corre_spectra.hpp * new correlation matrix class : CorreSpectra2 (testing: run for n=3, bug for n=10) * fix bugs of CorreSpectra2 for BilliardWalk * add some more tests + optimize reflection of CorreSpectra2 * fix some bugs of Spectrahedra to run BallWalk and AcceleratedBilliardWalk * New changes: * Change name of CorreSpectr2 -> CorreSpectra_MT * Added and tested BallWalk for CorreSpectra_MT * Compute diameter: remove NT(6) * Remove commented code * remove redundant comments * add examples for sampling correlation matrices and remove redundant functions in tests * added RDHR walk + fixed small changes * remove redundant files in examples * update CMakeLists in examples to enable MKL * change MKL linking in examples' CMakeLists.txt * change const specifier in several functions + readded const for Polytope arguments in functions of uniform_ball_walk.hpp * add const specifier to is_in in spectrahedron class (required for Ball Walk) * newline end of gitignore * add copyright to examples * format uniform_billiard_walk.hpp (indent, trailing spaces,...) * change header guards of convex_bodies correlation_matrices files * fix bugs in Spectrahedron line_intersect (wrong sign of negative distance) and change order of vector coefficients of CorreSpectra to lower triangular part (to homogenize with CorreSpectra_MT) * homogenize check_output in tests for CorreSpectra and CorreSpectra_MT * change names of CorreSpectra classes to CorrelationSpectrahedron * change include path of CorrelationSpectrahedron in random walks * format and optimize (minor) sampling/sphere.hpp * add Copyright headers * format style corre_matrix.hpp * format style CorrelationSpectrahedron * format style CorrelationSpectrahedron classes * move direct (old) sampling functions to examples and remove tests for those functions in test file * remove old tests from CMakeLists.txt * add const keywords back to RDHR Walk * fix bugs in corre_matrix * add const keyword back to gaussian random point generator Co-authored-by: phuoc <huu-phuoc.le@lip6.fr> Co-authored-by: Vissarion Fisikopoulos <fisikop@gmail.com>
* first commit * draft * draft * update some code * finish Point_matrix.cpp * change name: CorreSpectra.cpp * update * TODO * change TODO * update * update * update * update * clean * update * correlation class * billiard walk * eigenvaluescorrelation.h * update * update * update * update * update * update * faster billiard walk * add missing CMake file * start hmc * add old sampler file * Revert "add old sampler file" This reverts commit 1b2f299. * Revert "start hmc" This reverts commit 642d4e1. * revert commits of HMC walk * clean unecessary code and fix minor changes * New class CorreSpectra inherits from Spectrahedron * add first code of ReHMC with leap frog for Gaussian sampling for testing * relocate files: * sample_correlation_matrices.hpp -> sampling/ * test.hpp -> test/sampling_correlation_matrices_test.cpp * ReHMC.cpp -> random_walks/gaussian_ReHMC_correlation.hpp * move test files to test folder and add more test * change ReHMC code to WalkType class to suit volesti * move content of EigenvaluesCorrelation to EigenvaluesProblems remove temporary HCM walk change Walk Length of test to 1 * simplify code of corre_spectra.hpp * new correlation matrix class : CorreSpectra2 (testing: run for n=3, bug for n=10) * fix bugs of CorreSpectra2 for BilliardWalk * add some more tests + optimize reflection of CorreSpectra2 * fix some bugs of Spectrahedra to run BallWalk and AcceleratedBilliardWalk * New changes: * Change name of CorreSpectr2 -> CorreSpectra_MT * Added and tested BallWalk for CorreSpectra_MT * Compute diameter: remove NT(6) * Remove commented code * remove redundant comments * add examples for sampling correlation matrices and remove redundant functions in tests * added RDHR walk + fixed small changes * remove redundant files in examples * update CMakeLists in examples to enable MKL * change MKL linking in examples' CMakeLists.txt * change const specifier in several functions + readded const for Polytope arguments in functions of uniform_ball_walk.hpp * add const specifier to is_in in spectrahedron class (required for Ball Walk) * newline end of gitignore * add copyright to examples * format uniform_billiard_walk.hpp (indent, trailing spaces,...) * change header guards of convex_bodies correlation_matrices files * fix bugs in Spectrahedron line_intersect (wrong sign of negative distance) and change order of vector coefficients of CorreSpectra to lower triangular part (to homogenize with CorreSpectra_MT) * homogenize check_output in tests for CorreSpectra and CorreSpectra_MT * change names of CorreSpectra classes to CorrelationSpectrahedron * change include path of CorrelationSpectrahedron in random walks * format and optimize (minor) sampling/sphere.hpp * add Copyright headers * format style corre_matrix.hpp * format style CorrelationSpectrahedron * format style CorrelationSpectrahedron classes * move direct (old) sampling functions to examples and remove tests for those functions in test file * remove old tests from CMakeLists.txt * add const keywords back to RDHR Walk * fix bugs in corre_matrix * add const keyword back to gaussian random point generator Co-authored-by: phuoc <huu-phuoc.le@lip6.fr> Co-authored-by: Vissarion Fisikopoulos <fisikop@gmail.com>
Hi all,
Here is a PR for sampling correlation matrices with uniform billiard walk.
Main new files are:
To test: execute bash script ./examples/correlation_matrices/test.sh then input a value for n from keyboard.
The code will run the new implementation and the one use Spectrahedron class and their timings. There is a commented line
check_output in test.hpp which can be uncommented to check the correctness of output,
The speed up comes from reflection operator (adapt the computation with special LMI) and linear intersection (Eigen Generalized Self Adjoint Solver is faster than Spectra SymGEigSolver (tested up to n = 18)).