ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
Train.hpp
Go to the documentation of this file.
1
9#pragma once
10
11#include "cli/CLIOptions.hpp"
12#include "io/Output.hpp"
13#include "stats/DataPacket.hpp"
14#include "stats/Stats.hpp"
15#include "utils/Types.hpp"
16#include "models/Model.hpp"
17
18namespace CLI {
19 class App;
20}
21
22namespace ppforest2::cli {
24 CLI::App* setup_train(CLI::App& app, CLIOptions& params);
25
27 void add_model_options(CLI::App* sub, ModelParams& model);
28
34
42
48 CLIOptions const& params,
50
55 int run_train(CLIOptions& params);
56}
CLI argument parsing, validation, and configuration for ppforest2.
Quiet-aware output context for CLI subcommands.
Definition Benchmark.hpp:18
Command-line interface: argument parsing, subcommands, and benchmark/evaluation orchestration.
Definition Benchmark.hpp:22
ppforest2::stats::DataPacket read_data(CLIOptions const &params, ppforest2::stats::RNG &rng)
Load or simulate data based on CLI options.
int run_train(CLIOptions &params)
Run the train subcommand.
void add_model_options(CLI::App *sub, ModelParams &model)
Add shared model options (size, lambda, threads, seed, vars) to sub.
TrainResult train_model(ppforest2::types::FeatureMatrix const &x, ppforest2::types::ResponseVector const &y, CLIOptions const &params, ppforest2::stats::RNG &rng)
Train a single model (Forest or Tree) on the given dataset.
CLI::App * setup_train(CLI::App &app, CLIOptions &params)
Register train subcommand options on app.
pcg32 RNG
Definition Stats.hpp:19
Eigen::Matrix< Feature, Eigen::Dynamic, Eigen::Dynamic > FeatureMatrix
Dynamic-size matrix of feature values.
Definition Types.hpp:24
Eigen::Matrix< Response, Eigen::Dynamic, 1 > ResponseVector
Dynamic-size column vector of group labels.
Definition Types.hpp:29
std::shared_ptr< Model > Ptr
Definition Model.hpp:26
All CLI options and runtime parameters.
Definition CLIOptions.hpp:32
Model training parameters shared by train and evaluate.
Definition ModelParams.hpp:12
Result of a train operation containing the model and training duration.
Definition Train.hpp:30
long long duration
Definition Train.hpp:32
ppforest2::Model::Ptr model
Definition Train.hpp:31
Bundled dataset: features, responses, and group labels.
Definition DataPacket.hpp:18