15 using Ptr = std::unique_ptr<RegressionForest>;
Outcome predict(FeatureVector const &x) const override=0
Per-row prediction (mode-specific: majority vote or mean).
Visitor interface for model dispatch.
Definition Model.hpp:51
types::Outcome Outcome
Definition RegressionForest.hpp:21
RegressionForest(TrainingSpec::Ptr spec)
BaggedTree::Ptr train_tree(FeatureMatrix const &x, OutcomeVector const &y, stats::RNG &rng) const override
Train one bagged tree on a bootstrap resample of x / y.
std::unique_ptr< RegressionForest > Ptr
Definition RegressionForest.hpp:15
static Ptr train(TrainingSpec const &spec, FeatureMatrix const &x, OutcomeVector const &y)
types::FeatureMatrix FeatureMatrix
Definition RegressionForest.hpp:18
types::Outcome predict(FeatureVector const &x) const override
Per-row prediction (mode-specific: majority vote or mean).
types::OutcomeVector OutcomeVector
Definition RegressionForest.hpp:20
void accept(Model::Visitor &visitor) const override
Accept a model visitor (mode-specific dispatch).
types::FeatureVector FeatureVector
Definition RegressionForest.hpp:19
Training configuration for projection pursuit trees and forests.
Definition TrainingSpec.hpp:43
std::shared_ptr< TrainingSpec > Ptr
Definition TrainingSpec.hpp:45
pcg32 RNG
Definition Stats.hpp:24
Eigen::Matrix< Feature, Eigen::Dynamic, Eigen::Dynamic > FeatureMatrix
Dynamic-size matrix of feature values.
Definition Types.hpp:33
Eigen::Matrix< Outcome, Eigen::Dynamic, 1 > OutcomeVector
Dynamic-size column vector of predictions.
Definition Types.hpp:42
Eigen::Matrix< Feature, Eigen::Dynamic, 1 > FeatureVector
Dynamic-size column vector of feature values.
Definition Types.hpp:36
Feature Outcome
Scalar type for predictions (float for both classification and regression).
Definition Types.hpp:30
Binarization strategies for multiclass-to-binary reduction.
Definition Benchmark.hpp:25
std::unique_ptr< Bagged< Tree > > Ptr
Definition Bagged.hpp:33