CRTP base class providing self-registration for strategy types.
Definition Strategy.hpp:93
std::shared_ptr< VariableSelection > Ptr
Definition Strategy.hpp:95
Abstract strategy for variable selection.
Definition VariableSelection.hpp:27
virtual void compute(NodeContext &ctx, stats::RNG &rng) const =0
Subclass implementation of variable selection.
void select(NodeContext &ctx, stats::RNG &rng) const
Select a subset of variables and store the result in the context.
types::FeatureVector Projector
Column vector of projection coefficients (one per variable).
Definition Projector.hpp:6
pcg32 RNG
Definition Stats.hpp:24
VariableSelection::Ptr uniform(int n_vars)
Factory function: uniform random variable selection.
VariableSelection::Ptr all()
Factory function: select all variables (no selection).
Binarization strategies for multiclass-to-binary reduction.
Definition Benchmark.hpp:25
Mutable context accumulating intermediate results during node training.
Definition NodeContext.hpp:20
Result(std::vector< int > const &selected_cols, size_t original_size)
Definition VariableSelection.hpp:43
size_t original_size
Number of columns in the original (unreduced) matrix.
Definition VariableSelection.hpp:39
::ppforest2::pp::Projector expand(::ppforest2::pp::Projector const &reduced_vector) const
Expand a reduced-dimension projector to the original space.
Definition VariableSelection.hpp:56
std::vector< int > selected_cols
Indices of the selected columns in the original matrix.
Definition VariableSelection.hpp:37