Skip to content
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

Improve max ball computation and develop analytic center computation #310

Merged

Conversation

TolisChal
Copy link
Member

No description provided.

@TolisChal TolisChal requested a review from vfisikop June 20, 2024 18:16
Copy link
Contributor

@vfisikop vfisikop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great addtions!


Output: (i) The analytic center of the polytope
(ii) A boolean variable that declares convergence
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reference for the algorithm / definitions would be useful here.
e.g. Convex Optimization, Boyd and Vandenberghe (Sect. 8.5.3)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

d.noalias() = - H.lu().solve(grad);
Ad.noalias() = A * d;
// Compute the step length
step = std::min(NT(0.99) * get_max_step<VT, NT>(Ad, b_Ax), NT(1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 0.99?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step should always equal to 1, the NT(0.99) * get_max_step<VT, NT>(Ad, b_Ax) is useful to deal with very hard skinny cases where the analytic center is near to the boundary and to avoid numerical overflows when computing the gradient and the Hessian. I'm using the same epsilon as in the analytic center computation in crhmc preprocessing. I changed the 0.99 to NT(1) - tol_bnd while const NT tol_bnd = NT(0.01);.

{
const int m = Ad.size();
NT max_element = std::numeric_limits<NT>::lowest(), max_element_temp;
for (int i = 0; i < m; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we mostly use the style

for 
{
  ....
}

in the library, would you mind switch to that style?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done

do {
iter++;
// Compute the direction
d.noalias() = - H.lu().solve(grad);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly the Hessian is psd so you can use Cholesky here, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Yes, exactly, done

@TolisChal TolisChal merged commit 723869e into GeomScale:develop Jun 21, 2024
25 of 27 checks passed
@TolisChal TolisChal deleted the develop_internal_point_computations branch June 21, 2024 19:13
TolisChal added a commit that referenced this pull request Jul 7, 2024
…310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments

---------

Authored-by: Apostolos Chalkis (TolisChal) <tolis.chal@gmail.com>
TolisChal added a commit that referenced this pull request Jul 7, 2024
…310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit to TolisChal/volume_approximation that referenced this pull request Jul 7, 2024
…eomScale#310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit to TolisChal/volume_approximation that referenced this pull request Jul 7, 2024
…eomScale#310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
…eomScale#310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
…eomScale#310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit to TolisChal/volume_approximation that referenced this pull request Jul 8, 2024
…eomScale#310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
TolisChal added a commit that referenced this pull request Jul 17, 2024
…310)

* improve the implementation of maximum ellipsoid computation

* minor fix in rounding unit-test

* fix file copyrights

* fix max_ball bug and create new unit test

* fix max_ball bug and create new unit test

* apply termination criterion after transformation in max ellipsoid rounding

* imrpove skinny poly generator's interface

* improve stopping criterion and seed setting

* complete unit tests implementations

* implement Newton method to compute the analytic center

* minor changes

* resolve PR comments

* complete analytic center computation

* resolve conflicts

* minor changes

* minor changes

* minor changes

* improve new unit tests

* resolve PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants