3 #ifndef FORPY_DECIDERS_IDECIDER_H_ 4 #define FORPY_DECIDERS_IDECIDER_H_ 8 #include "../util/serialization/basics.h" 14 #include "../data_providers/idataprovider.h" 15 #include "../threshold_optimizers/ithreshopt.h" 17 #include "../util/desk.h" 53 const uint &min_samples_at_leaf,
79 const std::function<
void(
void *)> &dptf =
nullptr)
const 97 std::pair<const std::vector<size_t> *,
98 const mu::variant<std::vector<float>, std::vector<double>,
99 std::vector<uint32_t>, std::vector<uint8_t>>
111 template <
class Archive>
118 #endif // FORPY_DECIDERS_IDECIDER_H_ IDecider()
Empty constructor to allow inheritance though DISALLOW_COPY_AND_ASSIGN is applied.
virtual std::shared_ptr< IThreshOpt > get_threshopt() const VIRTUAL_PTR
virtual void make_node(const TodoMark &todo_info, const uint &min_samples_at_leaf, const IDataProvider &data_provider, Desk *d) const VIRTUAL_VOID
Optimizes a classifier for the given data and stores the params.
A data provider for the training of one tree.
size_t id_t
Element id type.
typename mu::variant< Empty, STOT< float >, STOT< double >, STOT< uint >, STOT< uint8_t > > Data
Storing a variant of the provided data container type.
virtual void ensure_capacity(const size_t &n_samples) VIRTUAL_VOID
Stores the parameters for one marked tree node.
void serialize(Archive &, const uint &)
friend class cereal::access
virtual bool decide(const id_t &node_id, const Data< MatCRef > &data, const std::function< void(void *)> &dptf=nullptr) const VIRTUAL(bool)
Makes a decision for a node with already optimized parameters.
DISALLOW_COPY_AND_ASSIGN(IDecider)
virtual bool operator==(const IDecider &rhs) const VIRTUAL(bool)
virtual size_t get_data_dim() const VIRTUAL(size_t)
virtual std::pair< const std::vector< size_t > *, const mu::variant< std::vector< float >, std::vector< double >, std::vector< uint32_t >, std::vector< uint8_t > > * > get_maps() const =0
virtual bool supports_weights() const VIRTUAL(bool)
Whether this classifier manager supports sample weights during training.
virtual std::shared_ptr< IDecider > create_duplicate(const uint &random_seed) const VIRTUAL_PTR
virtual void finalize_capacity(const size_t &size) VIRTUAL_VOID
Interface for the decider. It does the optimization of the deciding classifier for each node and stor...
unsigned int uint
Convenience typedef for unsigned int.
virtual bool is_compatible_with(const IDataProvider &dprov) VIRTUAL(bool)
virtual void transfer_or_run_check(const std::shared_ptr< IDecider > &other, IDataProvider *dprov) VIRTUAL_VOID
virtual void set_data_dim(const size_t &val) VIRTUAL_VOID