|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Abstract strategy for computing the split threshold. More...
#include <SRStrategy.hpp>
Public Member Functions | |
| types::Feature | operator() (types::FeatureMatrix const &group_1, types::FeatureMatrix const &group_2, pp::Projector const &projector) const |
| Convenience operator: equivalent to threshold(). | |
| virtual types::Feature | threshold (types::FeatureMatrix const &group_1, types::FeatureMatrix const &group_2, pp::Projector const &projector) const =0 |
| Compute the split threshold for two groups. | |
Public Member Functions inherited from Strategy< SRStrategy > | |
| 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< SRStrategy > | |
| using | Factory |
| Factory function type for deserializing a strategy from JSON. | |
| using | Ptr |
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. | |
Abstract strategy for computing the split threshold.
Given the data for two groups and a projection vector, determines the threshold value that separates the groups in the projected space. Concrete subclasses implement different splitting rules (e.g. mean of group means, median-based rules).
Implementations must also provide to_json() for serialization.
|
inline |
Convenience operator: equivalent to threshold().
|
pure virtual |
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). |
Implemented in ppforest2::sr::SRMeanOfMeansStrategy.