|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Abstract strategy for multiclass-to-binary reduction. More...
#include <Binarization.hpp>
Public Member Functions | |
| void | regroup (NodeContext &ctx, stats::RNG &rng) const |
| Reduce a multiclass partition to binary and store in context. | |
Public Member Functions inherited from Strategy< Binarization > | |
| virtual | ~Strategy ()=default |
| virtual std::string | display_name () const=0 |
| Human-readable name for display in summaries. | |
| virtual std::set< ppforest2::types::Mode > | supported_modes () const=0 |
| Training modes this strategy supports. | |
| virtual nlohmann::json | to_json () const=0 |
| Serialize this strategy's configuration to JSON. | |
Protected Member Functions | |
| virtual void | compute (NodeContext &ctx, stats::RNG &rng) const =0 |
| Subclass implementation of binarization. | |
Additional Inherited Members | |
Public Types inherited from Strategy< Binarization > | |
| using | Factory |
| Factory function type for deserializing a strategy from JSON. | |
| using | Ptr |
Static Public Member Functions inherited from Strategy< Binarization > | |
| static Ptr | from_json (nlohmann::json const &j) |
| Construct a strategy from its JSON representation. | |
| static bool | register_strategy (std::string const &name, Factory factory) |
| Register a concrete strategy for JSON deserialization. | |
Abstract strategy for multiclass-to-binary reduction.
Writes ctx.y_bin.
|
protectedpure virtual |
Subclass implementation of binarization.
Implemented in ppforest2::binarize::Disabled, and ppforest2::binarize::LargestGap.
| void ppforest2::binarize::Binarization::regroup | ( | NodeContext & | ctx, |
| stats::RNG & | rng ) const |
Reduce a multiclass partition to binary and store in context.
Public NVI entry point: skips if ctx.aborted is set, otherwise delegates to the subclass-provided compute.