ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
ppforest2::vars::All Class Reference

Selects all variables (no variable selection). More...

#include <All.hpp>

Public Member Functions

std::string display_name () const override
 Human-readable name for display in summaries.
 
std::set< types::Modesupported_modes () const override
 Training modes this strategy supports.
 
nlohmann::json to_json () const override
 Serialize this strategy's configuration to JSON.
 
- Public Member Functions inherited from ppforest2::vars::VariableSelection
void select (NodeContext &ctx, stats::RNG &rng) const
 Select a subset of variables and store the result in the context.
 
- Public Member Functions inherited from Strategy< VariableSelection >
virtual ~Strategy ()=default
 

Static Public Member Functions

static VariableSelection::Ptr from_json (nlohmann::json const &j)
 
- Static Public Member Functions inherited from Strategy< VariableSelection >
static Ptr from_json (nlohmann::json const &j)
 Construct a strategy from its JSON representation.
 
static bool register_strategy (std::string const &name, Factory factory)
 Register a concrete strategy for JSON deserialization.
 

Protected Member Functions

void compute (NodeContext &ctx, stats::RNG &rng) const override
 Subclass implementation of variable selection.
 

Additional Inherited Members

- Public Types inherited from Strategy< VariableSelection >
using Factory
 Factory function type for deserializing a strategy from JSON.
 
using Ptr
 

Detailed Description

Selects all variables (no variable selection).

Used with standard (non-random-forest) trees where all features are available to the projection pursuit step at every node.

Member Function Documentation

◆ compute()

void ppforest2::vars::All::compute ( NodeContext & ctx,
stats::RNG & rng ) const
overrideprotectedvirtual

Subclass implementation of variable selection.

Implements ppforest2::vars::VariableSelection.

◆ display_name()

std::string ppforest2::vars::All::display_name ( ) const
inlineoverridevirtual

Human-readable name for display in summaries.

Implements Strategy< VariableSelection >.

◆ from_json()

static VariableSelection::Ptr ppforest2::vars::All::from_json ( nlohmann::json const & j)
static

◆ supported_modes()

std::set< types::Mode > ppforest2::vars::All::supported_modes ( ) const
inlineoverridevirtual

Training modes this strategy supports.

Every concrete strategy MUST explicitly declare which modes it supports — there is no default. This forces implementers to think about mode compatibility rather than silently inheriting both modes and triggering runtime surprises.

Used by TrainingSpec to validate that every selected strategy is compatible with the configured training mode. Fails fast at build time instead of silently misbehaving at train time.

Implements Strategy< VariableSelection >.

◆ to_json()

nlohmann::json ppforest2::vars::All::to_json ( ) const
overridevirtual

Serialize this strategy's configuration to JSON.

Must include a "name" field identifying the strategy type, plus any strategy-specific parameters.

Implements Strategy< VariableSelection >.


The documentation for this class was generated from the following file: