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

Evaluate and convergence options (shared by evaluate + benchmark). More...

#include <EvaluateParams.hpp>

Classes

struct  Convergence
 Convergence control. More...
 

Public Member Functions

 EvaluateParams ()=default
 
 EvaluateParams (nlohmann::json const &config)
 Construct from a JSON config object.
 
bool convergence_enabled () const
 Whether adaptive convergence stopping is active (disabled when iterations is set).
 
nlohmann::json overrides () const
 JSON with only the fields explicitly set (for scenario overrides).
 
void resolve_defaults ()
 Fill unset optional fields with their default values.
 
nlohmann::json to_json () const
 Serialize to JSON config.
 

Static Public Member Functions

static void validate (nlohmann::json const &config, std::vector< std::string > &errors)
 Validate evaluate-related fields in a JSON config.
 

Public Attributes

struct ppforest2::cli::EvaluateParams::Convergence convergence
 
std::string export_path
 
bool fixed_seed = false
 Use the user-provided seed unchanged for every iteration.
 
std::optional< int > iterations
 Fixed count (disables convergence when set > 0).
 
std::optional< float > train_ratio
 
int warmup = 0
 Warmup iterations discarded before measuring.
 

Detailed Description

Evaluate and convergence options (shared by evaluate + benchmark).

Constructor & Destructor Documentation

◆ EvaluateParams() [1/2]

ppforest2::cli::EvaluateParams::EvaluateParams ( )
default

◆ EvaluateParams() [2/2]

ppforest2::cli::EvaluateParams::EvaluateParams ( nlohmann::json const & config)
explicit

Construct from a JSON config object.

Member Function Documentation

◆ convergence_enabled()

bool ppforest2::cli::EvaluateParams::convergence_enabled ( ) const
inline

Whether adaptive convergence stopping is active (disabled when iterations is set).

◆ overrides()

nlohmann::json ppforest2::cli::EvaluateParams::overrides ( ) const

JSON with only the fields explicitly set (for scenario overrides).

◆ resolve_defaults()

void ppforest2::cli::EvaluateParams::resolve_defaults ( )

Fill unset optional fields with their default values.

◆ to_json()

nlohmann::json ppforest2::cli::EvaluateParams::to_json ( ) const

Serialize to JSON config.

◆ validate()

static void ppforest2::cli::EvaluateParams::validate ( nlohmann::json const & config,
std::vector< std::string > & errors )
static

Validate evaluate-related fields in a JSON config.

Member Data Documentation

◆ convergence

struct ppforest2::cli::EvaluateParams::Convergence ppforest2::cli::EvaluateParams::convergence

◆ export_path

std::string ppforest2::cli::EvaluateParams::export_path

◆ fixed_seed

bool ppforest2::cli::EvaluateParams::fixed_seed = false

Use the user-provided seed unchanged for every iteration.

Default (false): each iteration draws a fresh seed from rng so models genuinely differ across iterations. std_*_error reflects real algorithmic variance; std_time_ms mixes system noise with model-shape variance.

true: every iteration trains the same model. std_*_error is tautologically zero; std_time_ms reflects pure timing noise (cache, scheduling, allocator jitter). Useful when benchmarking the timing stability of a single configuration.

◆ iterations

std::optional<int> ppforest2::cli::EvaluateParams::iterations

Fixed count (disables convergence when set > 0).

◆ train_ratio

std::optional<float> ppforest2::cli::EvaluateParams::train_ratio

◆ warmup

int ppforest2::cli::EvaluateParams::warmup = 0

Warmup iterations discarded before measuring.


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