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

All CLI options and runtime parameters. More...

#include <CLIOptions.hpp>

Public Member Functions

 Params ()=default
 
 Params (nlohmann::json const &config)
 Construct from a JSON config object.
 
stats::DataPacket read_data (stats::RNG &rng)
 Load the training data: from the --data CSV when set, or simulated from --simulate params otherwise.
 
void resolve ()
 Resolve intermediate representations into final form.
 
void resolve_defaults (unsigned int total_vars)
 Fill in runtime defaults (seed, threads, vars, strategy configs).
 
void resolve_seed ()
 Generate a random seed if none was set.
 
nlohmann::json to_json () const
 Serialize to a JSON config (round-trips with the JSON constructor).
 

Public Attributes

BenchmarkParams benchmark
 
std::string data_path
 
EvaluateParams evaluate
 
ModelParams model
 
std::string model_path
 
bool no_color = false
 
bool no_metrics = false
 
bool no_proportions = false
 
bool no_save = false
 
std::string output_path
 
bool quiet = false
 
std::string save_path = "model.json"
 
ServeParams serve
 
SimulateParams simulation
 
Subcommand subcommand = Subcommand::none
 

Detailed Description

All CLI options and runtime parameters.

Fields with -1 or empty defaults are sentinel values meaning "not set by the user" and will be resolved by init_params().

Constructor & Destructor Documentation

◆ Params() [1/2]

ppforest2::cli::Params::Params ( )
default

◆ Params() [2/2]

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

Construct from a JSON config object.

Member Function Documentation

◆ read_data()

stats::DataPacket ppforest2::cli::Params::read_data ( stats::RNG & rng)

Load the training data: from the --data CSV when set, or simulated from --simulate params otherwise.

Side effect: when model.mode_input is empty, infers it — from the CSV's y column shape (regression if group_names is empty) or defaults to "classification" for simulated data.

◆ resolve()

void ppforest2::cli::Params::resolve ( )

Resolve intermediate representations into final form.

Parses strategy input strings into config JSON, resolves p_vars input, parses simulate format, and runs validation. Called after all sources (config file + CLI) have populated the fields.

◆ resolve_defaults()

void ppforest2::cli::Params::resolve_defaults ( unsigned int total_vars)

Fill in runtime defaults (seed, threads, vars, strategy configs).

Parameters
total_varsTotal number of feature columns.

◆ resolve_seed()

void ppforest2::cli::Params::resolve_seed ( )

Generate a random seed if none was set.

◆ to_json()

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

Serialize to a JSON config (round-trips with the JSON constructor).

Member Data Documentation

◆ benchmark

BenchmarkParams ppforest2::cli::Params::benchmark

◆ data_path

std::string ppforest2::cli::Params::data_path

◆ evaluate

EvaluateParams ppforest2::cli::Params::evaluate

◆ model

ModelParams ppforest2::cli::Params::model

◆ model_path

std::string ppforest2::cli::Params::model_path

◆ no_color

bool ppforest2::cli::Params::no_color = false

◆ no_metrics

bool ppforest2::cli::Params::no_metrics = false

◆ no_proportions

bool ppforest2::cli::Params::no_proportions = false

◆ no_save

bool ppforest2::cli::Params::no_save = false

◆ output_path

std::string ppforest2::cli::Params::output_path

◆ quiet

bool ppforest2::cli::Params::quiet = false

◆ save_path

std::string ppforest2::cli::Params::save_path = "model.json"

◆ serve

ServeParams ppforest2::cli::Params::serve

◆ simulation

SimulateParams ppforest2::cli::Params::simulation

◆ subcommand

Subcommand ppforest2::cli::Params::subcommand = Subcommand::none

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