ppforest2
v0.1.0
Projection Pursuit Decision Trees and Random Forests
Loading...
Searching...
No Matches
All.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
models/strategies/vars/VariableSelection.hpp
"
4
#include "
models/strategies/Strategy.hpp
"
5
6
namespace
ppforest2::vars
{
13
class
All
:
public
VariableSelection
{
14
protected
:
15
void
compute
(
NodeContext
& ctx,
stats::RNG
& rng)
const override
;
16
17
public
:
18
nlohmann::json
to_json
()
const override
;
19
std::string
display_name
()
const override
{
return
"All variables"
; }
20
std::set<types::Mode>
supported_modes
()
const override
{
21
return
{
types::Mode::Classification
,
types::Mode::Regression
};
22
}
23
24
static
VariableSelection::Ptr
from_json
(nlohmann::json
const
& j);
25
26
PPFOREST2_REGISTER_STRATEGY
(
VariableSelection
,
"all"
)
27
};
28
}
Strategy.hpp
PPFOREST2_REGISTER_STRATEGY
#define PPFOREST2_REGISTER_STRATEGY(StrategyBase, name)
Auto-registration macro for strategy factories.
Definition
Strategy.hpp:185
VariableSelection.hpp
Strategy< VariableSelection >::Ptr
std::shared_ptr< VariableSelection > Ptr
Definition
Strategy.hpp:95
ppforest2::vars::All
Selects all variables (no variable selection).
Definition
All.hpp:13
ppforest2::vars::All::compute
void compute(NodeContext &ctx, stats::RNG &rng) const override
Subclass implementation of variable selection.
ppforest2::vars::All::from_json
static VariableSelection::Ptr from_json(nlohmann::json const &j)
ppforest2::vars::All::supported_modes
std::set< types::Mode > supported_modes() const override
Training modes this strategy supports.
Definition
All.hpp:20
ppforest2::vars::All::to_json
nlohmann::json to_json() const override
Serialize this strategy's configuration to JSON.
ppforest2::vars::All::display_name
std::string display_name() const override
Human-readable name for display in summaries.
Definition
All.hpp:19
ppforest2::vars::VariableSelection
Abstract strategy for variable selection.
Definition
VariableSelection.hpp:27
ppforest2::stats::RNG
pcg32 RNG
Definition
Stats.hpp:24
ppforest2::types::Mode::Classification
@ Classification
Definition
Types.hpp:58
ppforest2::types::Mode::Regression
@ Regression
Definition
Types.hpp:58
ppforest2::vars
Definition
All.hpp:6
ppforest2::NodeContext
Mutable context accumulating intermediate results during node training.
Definition
NodeContext.hpp:20
core
src
models
strategies
vars
All.hpp
Generated by
1.13.2