Skip to content

Commit 700f135

Browse files
fix strauss test
1 parent 9b52d61 commit 700f135

3 files changed

Lines changed: 163 additions & 255 deletions

File tree

tests/stochastic/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ add_geode_test(
169169
${PROJECT_NAME}::stochastic
170170
)
171171

172-
# add_geode_test(
173-
# SOURCE "sampling/mcmc/test-mh-strauss.cpp"
174-
# DEPENDENCIES
175-
# OpenGeode::basic
176-
# OpenGeode::geometry
177-
# ${PROJECT_NAME}::stochastic
178-
# )
172+
add_geode_test(
173+
SOURCE "sampling/mcmc/test-mh-strauss.cpp"
174+
DEPENDENCIES
175+
OpenGeode::basic
176+
OpenGeode::geometry
177+
${PROJECT_NAME}::stochastic
178+
)
179179

180180

181181
add_geode_test(

tests/stochastic/sampling/mcmc/test-mh-poisson.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,10 @@
2525
#include <geode/stochastic/inference/statistics_tools.hpp>
2626
#include <geode/stochastic/inference/target_statistics.hpp>
2727

28-
#include <geode/stochastic/models/energy_terms/energy_term_builder.hpp>
29-
#include <geode/stochastic/models/energy_terms/energy_term_config.hpp>
30-
#include <geode/stochastic/models/gibbs_energy.hpp>
31-
32-
#include <geode/stochastic/sampling/direct/object_set_sampler/point_set_sampler.hpp>
33-
3428
#include <geode/stochastic/sampling/mcmc/helpers/simulation_context.hpp>
35-
#include <geode/stochastic/sampling/mcmc/metropolis_hasting_sampler.hpp>
36-
#include <geode/stochastic/sampling/mcmc/proposal/classical_proposals.hpp>
3729
#include <geode/stochastic/sampling/mcmc/simulation_runner.hpp>
3830

39-
#include <geode/stochastic/sampling/mcmc/proposal/object_set_dynamic_config.hpp>
4031
#include <geode/stochastic/spatial/object_sets.hpp>
41-
#include <geode/stochastic/spatial/single_object_features/single_object_feature_config.hpp>
4232

4333
namespace
4434
{
@@ -86,8 +76,8 @@ namespace
8676
// run simulation
8777

8878
geode::SimulationConfigurator sim_config;
89-
sim_config.realizations = 1000;
90-
sim_config.metropolis_hasting_steps = 1000;
79+
sim_config.realizations = 2000;
80+
sim_config.metropolis_hasting_steps = 100;
9181
sim_config.burn_in_steps = 1000;
9282

9383
geode::SimulationPrinterConfigurator printer_config;
@@ -102,9 +92,9 @@ namespace
10292
targeted_statistics_descriptors;
10393
geode::TargetStatisticConfig stat_a{ "density", 30.0, 0.15 };
10494
targeted_statistics_descriptors.push_back( stat_a );
105-
10695
geode::TargetStatistics target_stats{ runner.model(),
10796
targeted_statistics_descriptors };
97+
10898
geode::statistics::validate( statistic_tracker, target_stats );
10999
}
110100
// NOLINTEND(*-magic-numbers)
@@ -178,9 +168,9 @@ namespace
178168

179169
// run simulation
180170
geode::SimulationConfigurator sim_config;
181-
sim_config.realizations = 1500;
182-
sim_config.metropolis_hasting_steps = 1000;
183-
sim_config.burn_in_steps = 3000;
171+
sim_config.realizations = 2000;
172+
sim_config.metropolis_hasting_steps = 100;
173+
sim_config.burn_in_steps = 1000;
184174

185175
geode::SimulationPrinterConfigurator printer_config;
186176
printer_config.output_folder = absl::StrCat(

0 commit comments

Comments
 (0)