ppforest2
v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
MeanOfMeans.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
models/strategies/cutpoint/Cutpoint.hpp
"
4
#include "
models/strategies/Strategy.hpp
"
5
#include "
utils/Types.hpp
"
6
7
namespace
ppforest2::cutpoint
{
15
class
MeanOfMeans
:
public
Cutpoint
{
16
public
:
17
static
Cutpoint::Ptr
from_json
(nlohmann::json
const
& j);
18
19
nlohmann::json
to_json
()
const override
;
20
std::string
display_name
()
const override
{
return
"Mean of means"
; }
21
std::set<types::Mode>
supported_modes
()
const override
{
22
return
{
types::Mode::Classification
,
types::Mode::Regression
};
23
}
24
25
PPFOREST2_REGISTER_STRATEGY
(
Cutpoint
,
"mean_of_means"
)
26
27
protected:
28
void
compute
(
NodeContext
& ctx,
stats
::RNG& rng) const override;
29
};
30
}
Cutpoint.hpp
Strategy.hpp
PPFOREST2_REGISTER_STRATEGY
#define PPFOREST2_REGISTER_STRATEGY(StrategyBase, name)
Auto-registration macro for strategy factories.
Definition
Strategy.hpp:185
Types.hpp
Strategy< Cutpoint >::Ptr
std::shared_ptr< Cutpoint > Ptr
Definition
Strategy.hpp:95
ppforest2::cutpoint::Cutpoint
Abstract strategy for computing the split cutpoint.
Definition
Cutpoint.hpp:23
ppforest2::cutpoint::MeanOfMeans
Split cutpoint as the mean of two group means.
Definition
MeanOfMeans.hpp:15
ppforest2::cutpoint::MeanOfMeans::supported_modes
std::set< types::Mode > supported_modes() const override
Training modes this strategy supports.
Definition
MeanOfMeans.hpp:21
ppforest2::cutpoint::MeanOfMeans::compute
void compute(NodeContext &ctx, stats::RNG &rng) const override
Subclass implementation of cutpoint computation.
ppforest2::cutpoint::MeanOfMeans::to_json
nlohmann::json to_json() const override
Serialize this strategy's configuration to JSON.
ppforest2::cutpoint::MeanOfMeans::display_name
std::string display_name() const override
Human-readable name for display in summaries.
Definition
MeanOfMeans.hpp:20
ppforest2::cutpoint::MeanOfMeans::from_json
static Cutpoint::Ptr from_json(nlohmann::json const &j)
ppforest2::cutpoint
Definition
Cutpoint.hpp:17
ppforest2::stats
Statistical infrastructure for training and evaluation.
Definition
ConfusionMatrix.hpp:11
ppforest2::types::Mode::Classification
@ Classification
Definition
Types.hpp:58
ppforest2::types::Mode::Regression
@ Regression
Definition
Types.hpp:58
ppforest2::NodeContext
Mutable context accumulating intermediate results during node training.
Definition
NodeContext.hpp:20
core
src
models
strategies
cutpoint
MeanOfMeans.hpp
Generated by
1.13.2