Skip to content

Conversation

@ivajankovic
Copy link

Rcpp wrapping for previously implemented Shake and Bake / Billiard Shake and Bake algorithms within sample_points.cpp.

if (HP.is_in(StartingPoint) == 0) {
throw Rcpp::exception("The given point is not in the interior of the polytope!");
}
if (gaussian) {
Copy link
Member

@TolisChal TolisChal Aug 18, 2025

Choose a reason for hiding this comment

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

If the boundary sampling algorithms are not selected then everything else should remain the same. Can you confirm that your changes does not break anything not related to boundary sampling?

Copy link
Author

Choose a reason for hiding this comment

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

I tested the Boundary HR algorithms they work properly, my code shouldn't affect anything because it is just protects shake and bake sampling from obtaining interior starting point

if (!set_starting_point) StartingPoint = InnerBall.first;
if (!set_mode && gaussian) mode = InnerBall.first;
if ((walk == shake_and_bake) || (walk == billiard_shake_bake)) {
if (!set_starting_point){
Copy link
Member

Choose a reason for hiding this comment

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

what happens if the user does give a boundary point?

Copy link
Author

Choose a reason for hiding this comment

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

this if loop just changes the starting point, everything else remains the same, it will just sample with the user given starting point

@TolisChal
Copy link
Member

Thanks @ivajankovic! This is an important feature! I left a few comments.

@ivajankovic
Copy link
Author

ivajankovic commented Aug 23, 2025

100D cube:

Method Min_ESS Max_PSRF Time_per_ind_sample
Boundary RDHR 3.000 3.078 0.009820514 secs
Boundary CDHR 8.659 1.283 0.000700732 secs
Shake and Bake 5.393 1.551 0.013780629 secs
Billiard Shake and Bake 8834.993 1.001 0.012030036 secs

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