Model training parameters shared by train and evaluate.
More...
#include <ModelParams.hpp>
|
| | ModelParams ()=default |
| |
| | ModelParams (nlohmann::json const &config) |
| | Construct from a JSON config object.
|
| |
| void | resolve () |
| | Parse strategy input strings and p_vars input into their final form.
|
| |
| void | resolve_defaults (unsigned int total_vars) |
| | Fill in runtime defaults (threads, vars, strategy configs).
|
| |
| nlohmann::json | to_json () const |
| | Serialize to JSON config.
|
| |
|
| static void | validate (nlohmann::json const &config, std::vector< std::string > &errors) |
| | Validate model-related fields in a JSON config.
|
| |
Model training parameters shared by train and evaluate.
◆ ModelParams() [1/2]
| ppforest2::cli::ModelParams::ModelParams |
( |
| ) |
|
|
default |
◆ ModelParams() [2/2]
| ppforest2::cli::ModelParams::ModelParams |
( |
nlohmann::json const & | config | ) |
|
|
explicit |
Construct from a JSON config object.
◆ resolve()
| void ppforest2::cli::ModelParams::resolve |
( |
| ) |
|
Parse strategy input strings and p_vars input into their final form.
◆ resolve_defaults()
| void ppforest2::cli::ModelParams::resolve_defaults |
( |
unsigned int | total_vars | ) |
|
Fill in runtime defaults (threads, vars, strategy configs).
◆ to_json()
| nlohmann::json ppforest2::cli::ModelParams::to_json |
( |
| ) |
const |
Serialize to JSON config.
◆ validate()
| static void ppforest2::cli::ModelParams::validate |
( |
nlohmann::json const & | config, |
|
|
std::vector< std::string > & | errors ) |
|
static |
Validate model-related fields in a JSON config.
◆ binarize_config
| nlohmann::json ppforest2::cli::ModelParams::binarize_config |
◆ binarize_input
| std::string ppforest2::cli::ModelParams::binarize_input |
◆ cutpoint_config
| nlohmann::json ppforest2::cli::ModelParams::cutpoint_config |
◆ cutpoint_input
| std::string ppforest2::cli::ModelParams::cutpoint_input |
◆ grouping_config
| nlohmann::json ppforest2::cli::ModelParams::grouping_config |
◆ grouping_input
| std::string ppforest2::cli::ModelParams::grouping_input |
◆ lambda
| float ppforest2::cli::ModelParams::lambda = 0.0 |
◆ leaf_config
| nlohmann::json ppforest2::cli::ModelParams::leaf_config |
◆ leaf_input
| std::string ppforest2::cli::ModelParams::leaf_input |
◆ max_retries
| int ppforest2::cli::ModelParams::max_retries = 3 |
◆ mode_input
| std::string ppforest2::cli::ModelParams::mode_input |
Training mode ("classification" or "regression").
Empty default = "infer from data": for --data, the CSV reader detects regression from fractional y values and read_data populates this; for --simulate, no data exists yet so we fall back to "classification". -m,--mode overrides both paths.
◆ n_vars
| std::optional<int> ppforest2::cli::ModelParams::n_vars |
◆ p_vars
| std::optional<float> ppforest2::cli::ModelParams::p_vars |
◆ p_vars_input
| std::string ppforest2::cli::ModelParams::p_vars_input |
◆ pp_config
| nlohmann::json ppforest2::cli::ModelParams::pp_config |
Strategy JSON objects (from CLI strings or config file).
◆ pp_input
| std::string ppforest2::cli::ModelParams::pp_input |
Explicit strategy inputs (–X flags).
◆ seed
| std::optional<int> ppforest2::cli::ModelParams::seed |
◆ size
| int ppforest2::cli::ModelParams::size = 100 |
◆ stop_config
| nlohmann::json ppforest2::cli::ModelParams::stop_config |
◆ stop_inputs
| std::vector<std::string> ppforest2::cli::ModelParams::stop_inputs |
Repeated --stop flag values.
The only strategy flag that accepts repeats: multiple occurrences collect into this vector and are composed into a CompositeStop any-rule at resolve() time. A single --stop behaves unchanged.
◆ threads
| std::optional<int> ppforest2::cli::ModelParams::threads |
◆ vars_config
| nlohmann::json ppforest2::cli::ModelParams::vars_config |
◆ vars_input
| std::string ppforest2::cli::ModelParams::vars_input |
The documentation for this struct was generated from the following file: