ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
SRStrategy.hpp
Go to the documentation of this file.
1#pragma once
2
4#include "models/Strategy.hpp"
5#include "utils/Types.hpp"
6
18namespace ppforest2::sr {
29 struct SRStrategy : public Strategy<SRStrategy> {
39 types::FeatureMatrix const& group_2,
40 pp::Projector const& projector) const = 0;
41
46 types::FeatureMatrix const& group_2,
47 pp::Projector const& projector) const {
48 return threshold(group_1, group_2, projector);
49 }
50 };
51}
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
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
CRTP base class providing self-registration for strategy types.
Definition Strategy.hpp:23
Abstract strategy for computing the split threshold.
Definition SRStrategy.hpp:29
types::Feature operator()(types::FeatureMatrix const &group_1, types::FeatureMatrix const &group_2, pp::Projector const &projector) const
Convenience operator: equivalent to threshold().
Definition SRStrategy.hpp:45
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.