ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
MinVariance.hpp
Go to the documentation of this file.
1#pragma once
2
5
6namespace ppforest2::stop {
16 class MinVariance : public StopRule {
17 public:
19
21
22 static StopRule::Ptr from_json(nlohmann::json const& j);
23
24 nlohmann::json to_json() const override;
25 std::string display_name() const override;
26 std::set<types::Mode> supported_modes() const override { return {types::Mode::Regression}; }
27
29 PPFOREST2_REGISTER_PRIMARY_PARAM("min_variance", "threshold")
30
31 protected:
32 bool compute(NodeContext const& ctx, stats::RNG& rng) const override;
33 };
34}
#define PPFOREST2_REGISTER_STRATEGY(StrategyBase, name)
Auto-registration macro for strategy factories.
Definition Strategy.hpp:185
#define PPFOREST2_REGISTER_PRIMARY_PARAM(strategy_name, param_name)
Declare the strategy's CLI positional-shorthand parameter.
Definition Strategy.hpp:228
std::shared_ptr< StopRule > Ptr
Definition Strategy.hpp:95
static StopRule::Ptr from_json(nlohmann::json const &j)
std::string display_name() const override
Human-readable name for display in summaries.
types::Feature threshold
Definition MinVariance.hpp:18
nlohmann::json to_json() const override
Serialize this strategy's configuration to JSON.
MinVariance(types::Feature threshold)
bool compute(NodeContext const &ctx, stats::RNG &rng) const override
Subclass implementation of the stop predicate.
std::set< types::Mode > supported_modes() const override
Training modes this strategy supports.
Definition MinVariance.hpp:26
Abstract strategy for tree stopping rules.
Definition StopRule.hpp:26
Statistical infrastructure for training and evaluation.
Definition ConfusionMatrix.hpp:11
Definition CompositeStop.hpp:8
@ Regression
Definition Types.hpp:58
float Feature
Scalar type for feature values.
Definition Types.hpp:24
Mutable context accumulating intermediate results during node training.
Definition NodeContext.hpp:20