ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
VarsSpec.hpp File Reference

Shared parsing for the –vars / vars parameter. More...

#include <nlohmann/json.hpp>
#include <string>

Go to the source code of this file.

Classes

struct  ppforest2::cli::VarsSpec
 Result of parsing a vars specification. More...
 

Namespaces

namespace  ppforest2
 
namespace  ppforest2::cli
 Command-line interface: argument parsing, subcommands, and benchmark/evaluation orchestration.
 

Functions

VarsSpec ppforest2::cli::parse_vars (nlohmann::json const &j)
 Parse vars from a JSON value (benchmark scenarios).
 
VarsSpec ppforest2::cli::parse_vars (std::string const &input)
 Parse vars from a string (CLI input).
 

Detailed Description

Shared parsing for the –vars / vars parameter.

Supports multiple input formats:

  • Integer count: 5 (number of features per split)
  • Decimal proportion: 0.5 (fraction of total features)
  • String fraction: "1/3" (computed proportion)

Used by both CLI argument parsing (CLIOptions.hpp) and benchmark scenario parsing (Benchmark.cpp).