|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Abstract strategy for dimensionality reduction. More...
#include <DRStrategy.hpp>
Public Member Functions | |
| DRResult | operator() (types::FeatureMatrix const &x, stats::GroupPartition const &group_spec, stats::RNG &rng) const |
| Convenience operator: equivalent to select(). | |
| virtual DRResult | select (types::FeatureMatrix const &x, stats::GroupPartition const &group_spec, stats::RNG &rng) const =0 |
| Select a subset of variables. | |
Public Member Functions inherited from Strategy< DRStrategy > | |
| virtual | ~Strategy ()=default |
| virtual std::string | display_name () const=0 |
| Human-readable name for display in summaries. | |
| virtual void | to_json (nlohmann::json &j) const=0 |
| Serialize this strategy's configuration to JSON. | |
Additional Inherited Members | |
Public Types inherited from Strategy< DRStrategy > | |
| using | Factory |
| Factory function type for deserializing a strategy from JSON. | |
| using | Ptr |
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. | |
Abstract strategy for dimensionality reduction.
Before projection pursuit optimization, a DR strategy selects a subset of variables (columns) to work with. This reduces the cost of the PP step and introduces randomness in forests.
Implementations must also provide to_json() for serialization.
|
inline |
Convenience operator: equivalent to select().
|
pure virtual |
Select a subset of variables.
| x | Feature matrix (n × p). |
| group_spec | Group partition. |
| rng | Random number generator. |
Implemented in ppforest2::dr::DRNoopStrategy, and ppforest2::dr::DRUniformStrategy.