|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Split threshold as the mean of two group means. More...
#include <SRMeanOfMeansStrategy.hpp>
Public Member Functions | |
| std::string | display_name () const override |
| Human-readable name for display in summaries. | |
| types::Feature | threshold (types::FeatureMatrix const &group_1, types::FeatureMatrix const &group_2, pp::Projector const &projector) const override |
| Compute the split threshold for two groups. | |
| void | to_json (nlohmann::json &j) const override |
| Serialize this strategy's configuration to JSON. | |
Public Member Functions inherited from ppforest2::sr::SRStrategy | |
| types::Feature | operator() (types::FeatureMatrix const &group_1, types::FeatureMatrix const &group_2, pp::Projector const &projector) const |
| Convenience operator: equivalent to threshold(). | |
Public Member Functions inherited from Strategy< SRStrategy > | |
| virtual | ~Strategy ()=default |
Static Public Member Functions | |
| static SRStrategy::Ptr | from_json (nlohmann::json const &j) |
Static Public Member Functions inherited from Strategy< SRStrategy > | |
| 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< SRStrategy > | |
| using | Factory |
| Factory function type for deserializing a strategy from JSON. | |
| using | Ptr |
Split threshold as the mean of two group means.
Computes the midpoint between the projected means of the two groups: (mean(group_1 * A) + mean(group_2 * A)) / 2. This is the default rule used by PPforest.
|
inlineoverridevirtual |
Human-readable name for display in summaries.
Implements Strategy< SRStrategy >.
|
static |
|
overridevirtual |
Compute the split threshold for two groups.
| group_1 | Feature matrix for the first group (n1 × p). |
| group_2 | Feature matrix for the second group (n2 × p). |
| projector | Projection vector (p). |
Implements ppforest2::sr::SRStrategy.
|
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< SRStrategy >.