Skip to content

Rcpp wrapping for Shake and Bake / Billiard Shake and Bake#34

Open
ivajankovic wants to merge 6 commits into
GeomScale:developfrom
ivajankovic:feature/sb_rcpp_wrapping
Open

Rcpp wrapping for Shake and Bake / Billiard Shake and Bake#34
ivajankovic wants to merge 6 commits into
GeomScale:developfrom
ivajankovic:feature/sb_rcpp_wrapping

Conversation

@ivajankovic

Copy link
Copy Markdown

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

Comment thread src/sample_points.cpp Outdated
Comment thread src/sample_points.cpp Outdated
Comment thread src/sample_points.cpp Outdated
if (HP.is_in(StartingPoint) == 0) {
throw Rcpp::exception("The given point is not in the interior of the polytope!");
}
if (gaussian) {

@TolisChal TolisChal Aug 18, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Comment thread src/sample_points.cpp
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@ivajankovic

ivajankovic commented Aug 23, 2025

Copy link
Copy Markdown
Author

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