ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
PDA.hpp
Go to the documentation of this file.
1#pragma once
2
5#include "utils/Types.hpp"
6
7namespace ppforest2::pp {
15 class PDA : public ProjectionPursuit {
16 public:
17 explicit PDA(float lambda);
18
19 static ProjectionPursuit::Ptr from_json(nlohmann::json const& j);
20
21 nlohmann::json to_json() const override;
22
23 std::string display_name() const override { return lambda == 0 ? "LDA" : "PDA"; }
24
25 std::set<types::Mode> supported_modes() const override {
27 }
28
31
32 protected:
33 void compute(NodeContext& ctx, stats::RNG& rng) const override;
34
35 private:
37 float const lambda;
38 };
39}
#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< ProjectionPursuit > Ptr
Definition Strategy.hpp:95
std::set< types::Mode > supported_modes() const override
Training modes this strategy supports.
Definition PDA.hpp:25
nlohmann::json to_json() const override
Serialize this strategy's configuration to JSON.
static ProjectionPursuit::Ptr from_json(nlohmann::json const &j)
std::string display_name() const override
Human-readable name for display in summaries.
Definition PDA.hpp:23
void compute(NodeContext &ctx, stats::RNG &rng) const override
PDA(float lambda)
Abstract strategy for projection pursuit optimization.
Definition ProjectionPursuit.hpp:25
Definition Projector.hpp:4
Statistical infrastructure for training and evaluation.
Definition ConfusionMatrix.hpp:11
@ Classification
Definition Types.hpp:58
@ Regression
Definition Types.hpp:58
Mutable context accumulating intermediate results during node training.
Definition NodeContext.hpp:20