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

Adaptation Handler #80

Merged
merged 8 commits into from
Jul 26, 2024
Merged

Adaptation Handler #80

merged 8 commits into from
Jul 26, 2024

Conversation

KSkwarczynski
Copy link
Member

Pull request description:

Currently All AMCMC related stuff in heavily integrated within CovarianceBase. This PR attempts to make full fledget adaption class which interfaces with Covariance base. If all adaptation is done via this handler then selcting different adaptation via polimorphism will be super easy.

There are still Adaptive funciton in covaraince. This will need to be adressed later. Will try do this when I have time again.

Changes or fixes:

  • Add new AdaptiveMCMCHandler
  • Update docuematnion
  • Security no idea why but let's pretend we are fancy...

@KSkwarczynski KSkwarczynski self-assigned this Jul 21, 2024


// ********************************************
void AdaptiveMCMCHandler::InitFromConfig(const YAML::Node& adapt_manager, const std::string& matrix_name_str, const int Npars) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given Npars won't change does it not make sense to make this a class attribute rather than calling it in every method?

if(total_steps>adaption_struct.end_adaptive_update || total_steps<adaption_struct.start_adaptive_update) return;

int steps_post_burn = total_steps - adaption_struct.start_adaptive_update;
if(total_steps>AdaptiveHandler.end_adaptive_update || total_steps<AdaptiveHandler.start_adaptive_update) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Conceptually do we not want to leave this logic inside the adaption handler?

@KSkwarczynski KSkwarczynski merged commit 3d74fdc into develop Jul 26, 2024
3 checks passed
@KSkwarczynski KSkwarczynski deleted the feature_AapationTidy branch July 26, 2024 14:28
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