Skip to content

Commit

Permalink
Replaced SingleSiteSampler with IntervalSampler for higher acceptance…
Browse files Browse the repository at this point in the history
… rate.
  • Loading branch information
xjlizji committed Sep 5, 2019
1 parent 4bd6492 commit 12b1022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/prog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ epievo_est_params_histories: \

epievo_sim_pairwise: \
$(addprefix $(COMMON_DIR)/, \
TripletSampler.o StateSeq.o SingleSiteSampler.o EndCondSampling.o \
TripletSampler.o StateSeq.o IntervalSampler.o EndCondSampling.o \
ContinuousTimeMarkovModel.o \
EpiEvoModel.o GlobalJump.o ParamEstimation.o)

Expand Down
9 changes: 5 additions & 4 deletions src/prog/epievo_sim_pairwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "EndCondSampling.hpp"
#include "ContinuousTimeMarkovModel.hpp"
#include "TreeHelper.hpp"
#include "SingleSiteSampler.hpp"
#include "IntervalSampler.hpp"
#include "TripletSampler.hpp"
#include "GlobalJump.hpp"
#include "ParamEstimation.hpp"
Expand Down Expand Up @@ -286,9 +286,10 @@ int main(int argc, const char **argv) {
// Burning
for(size_t burnin_itr = 0; burnin_itr < burnin; burnin_itr++) {
for (size_t site_id = 1; site_id < n_sites - 1; ++site_id) {
vector<Path> proposed_path;
Metropolis_Hastings_site(the_model, th, site_id, paths, gen,
proposed_path, true);
//vector<Path> proposed_path;
//Metropolis_Hastings_site(the_model, th, site_id, paths, gen,
// proposed_path, true);
Metropolis_Hastings_interval(the_model, th, site_id, paths, gen);
}
}
write_root_to_pathfile_local(outfile, th.node_names.front());
Expand Down

0 comments on commit 12b1022

Please sign in to comment.