|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Uniform random dimensionality reduction. More...
#include <DRUniformStrategy.hpp>
Public Member Functions | |
| DRUniformStrategy (int n_vars) | |
| std::string | display_name () const override |
| Human-readable name for display in summaries. | |
| DRResult | select (types::FeatureMatrix const &x, stats::GroupPartition const &group_spec, stats::RNG &rng) const override |
| Select a subset of variables. | |
| void | to_json (nlohmann::json &j) const override |
| Serialize this strategy's configuration to JSON. | |
Public Member Functions inherited from ppforest2::dr::DRStrategy | |
| DRResult | operator() (types::FeatureMatrix const &x, stats::GroupPartition const &group_spec, stats::RNG &rng) const |
| Convenience operator: equivalent to select(). | |
Public Member Functions inherited from Strategy< DRStrategy > | |
| virtual | ~Strategy ()=default |
Static Public Member Functions | |
| static DRStrategy::Ptr | from_json (nlohmann::json const &j) |
Static Public Member Functions inherited from Strategy< DRStrategy > | |
| 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. | |
Additional Inherited Members | |
Public Types inherited from Strategy< DRStrategy > | |
| using | Factory |
| Factory function type for deserializing a strategy from JSON. | |
| using | Ptr |
Uniform random dimensionality reduction.
Selects n_vars variables uniformly at random (without replacement) from the full set of features. Used in random forests to introduce diversity between trees.
|
explicit |
|
inlineoverridevirtual |
Human-readable name for display in summaries.
Implements Strategy< DRStrategy >.
|
static |
|
overridevirtual |
Select a subset of variables.
| x | Feature matrix (n × p). |
| group_spec | Group partition. |
| rng | Random number generator. |
Implements ppforest2::dr::DRStrategy.
|
overridevirtual |
Serialize this strategy's configuration to JSON.
Must include a "name" field identifying the strategy type, plus any strategy-specific parameters.
| j | JSON object to populate. |
Implements Strategy< DRStrategy >.