Commit b9b8cc76 authored by stefanow's avatar stefanow
Browse files

Merge branch 'master' of gitlab.ethz.ch:stefanow/tmcmc

parents f407a40c 6fd84416
......@@ -49,7 +49,6 @@ int main(){
#pragma omp parallel for schedule(static)
for(index_t i = 0; i < POP_SIZE; ++i){
likelihoods_old(i) = likelihood(thetas.col(i));
std::cout << likelihoods_old(i) << "<-likelihoods_old(i) \n";
}
std::cout << "Done.\n";
......@@ -61,7 +60,7 @@ int main(){
/// Compute weights
#pragma omp parallel for schedule(static)
for(index_t i = 0; i < POP_SIZE; ++i){
weights(i) = std::pow(likelihoods(i), (rho_next - rho_curr));
weights(i) = std::pow(likelihoods_old(i), (rho_next - rho_curr));
}
/// Update evidence
......@@ -105,8 +104,6 @@ int main(){
}
}
assert(likelihoods.minCoeff() >= 0);
std::cout << likelihoods.minCoeff() << "<- min likelihood\n";
std::cout << likelihoods.maxCoeff() << "<- max likelihood\n";
/// Prepare next iteration
std::cout << "Step " << step_count++ << " done.\n";
thetas.swap(thetas_new);
......
......@@ -135,7 +135,6 @@ inline static PopMatrix mcmc(const ThetaVector & theta, const index_t rck, const
std::uniform_real_distribution<numeric_t> acc_dist(0,1);
particle = theta;
numeric_t particle_likelihood = likelihoods(k);
std::cout << particle_likelihood << "<-part. lh old\n";
#ifdef BURNIN
for(index_t i = 0; i < rck + BURNIN; ++i){
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment