ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::cli::ConvergenceCriteria Struct Reference

Convergence criteria for adaptive stopping in benchmarks. More...

#include <Benchmark.hpp>

Public Attributes

float cv = 0.05f
 
int max = 200
 
int min = 10
 
int window = 3
 

Detailed Description

Convergence criteria for adaptive stopping in benchmarks.

Instead of running a fixed number of iterations, convergence mode monitors the coefficient of variation (CV = std/mean) of timing measurements and stops once results are statistically stable.

The algorithm works as follows:

  1. After each iteration, compute CV across all timing samples.
  2. If CV < cv_threshold, increment a stability counter. Otherwise, reset the counter to zero.
  3. Stop when the counter reaches stable_window (i.e., CV stayed below threshold for stable_window consecutive iterations).
  4. Never check before min_iterations (need enough samples).
  5. Never exceed max_iterations (hard cap to prevent runaway).

Member Data Documentation

◆ cv

float ppforest2::cli::ConvergenceCriteria::cv = 0.05f

Target CV threshold (e.g., 0.05 = stop when std < 5% of mean).

◆ max

int ppforest2::cli::ConvergenceCriteria::max = 200

Hard upper bound on iterations (stops even if not converged).

◆ min

int ppforest2::cli::ConvergenceCriteria::min = 10

Minimum iterations before convergence checks begin.

◆ window

int ppforest2::cli::ConvergenceCriteria::window = 3

Number of consecutive iterations that must stay below the CV threshold.


The documentation for this struct was generated from the following file: