Interface for the decider. It does the optimization of the deciding classifier for each node and stores the parameters.
More...
|
virtual | ~IDecider () |
|
virtual std::shared_ptr< IDecider > | create_duplicate (const uint &random_seed) 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. More...
|
|
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 | ensure_capacity (const size_t &n_samples) VIRTUAL_VOID |
|
virtual void | finalize_capacity (const size_t &size) VIRTUAL_VOID |
|
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. More...
|
|
virtual bool | supports_weights () const VIRTUAL(bool) |
| Whether this classifier manager supports sample weights during training. More...
|
|
virtual size_t | get_data_dim () const VIRTUAL(size_t) |
|
virtual void | set_data_dim (const size_t &val) VIRTUAL_VOID |
|
virtual std::shared_ptr< IThreshOpt > | get_threshopt () const VIRTUAL_PTR |
|
virtual bool | operator== (const IDecider &rhs) const VIRTUAL(bool) |
|
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 |
|
Interface for the decider. It does the optimization of the deciding classifier for each node and stores the parameters.
- Parameters
-
input_dtype | The datatype of the data to classify. |
annotation_dtype | The datatype of the annotations. |
feature_dtype | The datatype in which features are calculated. |
Definition at line 31 of file idecider.h.
virtual void forpy::IDecider::make_node |
( |
const TodoMark & |
todo_info, |
|
|
const uint & |
min_samples_at_leaf, |
|
|
const IDataProvider & |
data_provider, |
|
|
Desk * |
d |
|
) |
| const |
|
virtual |
Optimizes a classifier for the given data and stores the params.
This method must either set make_to_leaf to true or assure that at least the minimum amount of samples per leaf is contained in each of element_list_left and element_list_right. In the case that make_leaf is true, the list pointers may even be returned uninitialized.
If it is necessary to enforce additional growing constraints for the tree, this is the right place (e.g. have a minimum number of samples per node). The classifier manager can take these constraints into account and may return make_to_leaf accordingly.
Reimplemented in forpy::FastDecider.