Commit 1b6ddb5f authored by stefanow's avatar stefanow
Browse files

t

parent ff17222a
......@@ -24,7 +24,11 @@ int main(){
}
/// Initialization
std::cout << "Using the " << PotentialName<POTENTIAL>::value << " potential\n";
std::cout << "Prior stddev = " << NORMAL_PRIOR_STDDEV << "\n";
#ifdef UNIF_PRIOR
std::cout << "Uniform prior with bounds = " << BOUND << "\n";
#else
std::cout << "Gaussian prior with stddev = " << NORMAL_PRIOR_STDDEV << "\n";
#endif
std::cout << "Initializing ... ";
numeric_t rho_next, rho_curr = 0;
PopMatrix thetas(N_DIM, POP_SIZE);
......@@ -63,6 +67,8 @@ int main(){
/// Normalize weights
weights /= weight_sum;
best_thetas.push_back(get_most_likely_theta(thetas, weights));
/// Resampling
resample(weights, resample_count);
......@@ -99,7 +105,6 @@ int main(){
std::cout << "Step " << step_count++ << " done.\n";
thetas.swap(thetas_new);
rho_curr = rho_next;
best_thetas.push_back(get_most_likely_theta(thetas, weights));
} while(rho_curr < 1.0);
std::cout << "The evidence is: " << evidence_s << "\n"
......
......@@ -67,6 +67,6 @@ extern XoroshiroRandomNumberEngine GEN;
//#define UNIF_PRIOR
//#define USE_BRENTS_METHOD
constexpr numeric_t BOUND = 1e1;
constexpr numeric_t BOUND = 1e3;
#pragma omp threadprivate(GEN)
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