16 void to_json(nlohmann::json& j)
const override;
17 std::string
display_name()
const override {
return "Mean of means"; }
#define PPFOREST2_REGISTER_STRATEGY(StrategyBase, name)
Auto-registration macro for strategy factories.
Definition Strategy.hpp:100
types::FeatureVector Projector
Column vector of projection coefficients (one per variable).
Definition Projector.hpp:6
Split rule strategies for computing decision thresholds.
Definition SRMeanOfMeansStrategy.hpp:7
SRStrategy::Ptr mean_of_means()
Factory function for a mean-of-means split strategy.
Eigen::Matrix< Feature, Eigen::Dynamic, Eigen::Dynamic > FeatureMatrix
Dynamic-size matrix of feature values.
Definition Types.hpp:24
float Feature
Scalar type for feature values (float or double).
Definition Types.hpp:17
std::shared_ptr< SRStrategy > Ptr
Definition Strategy.hpp:24
Split threshold as the mean of two group means.
Definition SRMeanOfMeansStrategy.hpp:15
void to_json(nlohmann::json &j) const override
Serialize this strategy's configuration to JSON.
std::string display_name() const override
Human-readable name for display in summaries.
Definition SRMeanOfMeansStrategy.hpp:17
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.
static SRStrategy::Ptr from_json(nlohmann::json const &j)
Abstract strategy for computing the split threshold.
Definition SRStrategy.hpp:29