forpy
2
|
Desk for decider training. More...
#include <desk.h>
Public Member Functions | |
void | setup (std::vector< size_t > *ntfp, mu::variant< std::vector< float >, std::vector< double >, std::vector< uint32_t >, std::vector< uint8_t >> *nttp) |
void | reset () |
Public Attributes | |
mu::variant< const float *, const double *, const uint *, const uint8_t * > | full_feat_p_v |
std::vector< size_t > | invalid_counts |
std::vector< size_t > * | node_to_featsel_p |
mu::variant< std::vector< float >, std::vector< double >, std::vector< uint32_t >, std::vector< uint8_t > > * | node_to_thresh_v_p |
size_t | n_samples |
These variables are populated in IDecider::make_node. More... | |
size_t | input_dim |
These variables are populated in IDecider::make_node. More... | |
size_t | annot_dim |
These variables are populated in IDecider::make_node. More... | |
uint | min_samples_at_leaf |
These variables are populated in IDecider::make_node. More... | |
id_t * | elem_id_p |
id_t | start_id |
These variables are populated in IDecider::make_node. More... | |
id_t | end_id |
These variables are populated in IDecider::make_node. More... | |
id_t | node_id |
These variables are populated in IDecider::make_node. More... | |
OptSplitV | best_res_v |
Variables used during the threshold optimization. More... | |
OptSplitV | opt_res_v |
Variables used during the threshold optimization. More... | |
id_t | best_feat_idx |
Variables used during the threshold optimization. More... | |
bool | presorted |
Variables used during the threshold optimization. More... | |
bool | need_sort |
Variables used during the threshold optimization. More... | |
std::vector< id_t > | feature_indices |
Variables used during the threshold optimization. More... | |
std::vector< float > | full_sum |
Variables initialized in IThreshOpt::full_entropy. More... | |
float * | full_sum_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
float | fullentropy |
Variables initialized in IThreshOpt::full_entropy. More... | |
float | maxproxy |
Variables initialized in IThreshOpt::full_entropy. More... | |
const float * | annot_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
const uint * | class_annot_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
size_t | annot_os |
Variables initialized in IThreshOpt::full_entropy. More... | |
const float * | weights_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
float | full_w |
Variables initialized in IThreshOpt::full_entropy. More... | |
std::vector< id_t > | sort_perm |
Variables initialized in IThreshOpt::full_entropy. More... | |
id_t * | sort_perm_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
std::vector< id_t > | elem_ids_sorted |
Variables initialized in IThreshOpt::full_entropy. More... | |
id_t * | elem_ids_sorted_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
std::vector< float > | feat_values |
Variables initialized in IThreshOpt::full_entropy. More... | |
float * | feat_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
DataV | class_feat_values |
Variables initialized in IThreshOpt::full_entropy. More... | |
std::vector< float > | left_sum_vec |
Variables initialized in IThreshOpt::full_entropy. More... | |
float * | left_sum_p |
Variables initialized in IThreshOpt::full_entropy. More... | |
bool | make_to_leaf |
Return values from IThreshOpt::optimize. More... | |
interv_t | left_int |
Return values from IThreshOpt::optimize. More... | |
interv_t | right_int |
Return values from IThreshOpt::optimize. More... | |
id_t | left_id |
Return values from IThreshOpt::optimize. More... | |
id_t | right_id |
Return values from IThreshOpt::optimize. More... | |
Desk for decider training.
Storage container for threaded decider training (see also Desk Implementations).
|
inline |
size_t forpy::DeciderDesk::annot_dim |
These variables are populated in IDecider::make_node.
size_t forpy::DeciderDesk::annot_os |
Variables initialized in IThreshOpt::full_entropy.
const float* forpy::DeciderDesk::annot_p |
Variables initialized in IThreshOpt::full_entropy.
id_t forpy::DeciderDesk::best_feat_idx |
OptSplitV forpy::DeciderDesk::best_res_v |
const uint* forpy::DeciderDesk::class_annot_p |
Variables initialized in IThreshOpt::full_entropy.
DataV forpy::DeciderDesk::class_feat_values |
Variables initialized in IThreshOpt::full_entropy.
id_t* forpy::DeciderDesk::elem_id_p |
std::vector<id_t> forpy::DeciderDesk::elem_ids_sorted |
Variables initialized in IThreshOpt::full_entropy.
id_t* forpy::DeciderDesk::elem_ids_sorted_p |
Variables initialized in IThreshOpt::full_entropy.
id_t forpy::DeciderDesk::end_id |
These variables are populated in IDecider::make_node.
float* forpy::DeciderDesk::feat_p |
Variables initialized in IThreshOpt::full_entropy.
std::vector<float> forpy::DeciderDesk::feat_values |
Variables initialized in IThreshOpt::full_entropy.
std::vector<id_t> forpy::DeciderDesk::feature_indices |
mu::variant<const float *, const double *, const uint *, const uint8_t *> forpy::DeciderDesk::full_feat_p_v |
Must be initialized before calling IThreshOpt::optimize. Points to the a selected feature vector (full samples, so even if for this node only samples 1:3 are needed, this points to the feature for sample 0) with stride 1. This can be done using IDataProvider::get_feature .
std::vector<float> forpy::DeciderDesk::full_sum |
Variables initialized in IThreshOpt::full_entropy.
float* forpy::DeciderDesk::full_sum_p |
Variables initialized in IThreshOpt::full_entropy.
float forpy::DeciderDesk::full_w |
Variables initialized in IThreshOpt::full_entropy.
float forpy::DeciderDesk::fullentropy |
Variables initialized in IThreshOpt::full_entropy.
size_t forpy::DeciderDesk::input_dim |
These variables are populated in IDecider::make_node.
std::vector<size_t> forpy::DeciderDesk::invalid_counts |
Stores the number of elements in a vector of feature IDs that have been determined as invalid (e.g., because they are constant). For these values to work correctly, only DFS may be used (otherwise, the vector of features may be re-sorted and counts may become invalid before the node optimization reaches relevant nodes).
id_t forpy::DeciderDesk::left_id |
Return values from IThreshOpt::optimize.
interv_t forpy::DeciderDesk::left_int |
Return values from IThreshOpt::optimize.
float* forpy::DeciderDesk::left_sum_p |
Variables initialized in IThreshOpt::full_entropy.
std::vector<float> forpy::DeciderDesk::left_sum_vec |
Variables initialized in IThreshOpt::full_entropy.
bool forpy::DeciderDesk::make_to_leaf |
Return values from IThreshOpt::optimize.
float forpy::DeciderDesk::maxproxy |
Variables initialized in IThreshOpt::full_entropy.
uint forpy::DeciderDesk::min_samples_at_leaf |
These variables are populated in IDecider::make_node.
size_t forpy::DeciderDesk::n_samples |
These variables are populated in IDecider::make_node.
bool forpy::DeciderDesk::need_sort |
id_t forpy::DeciderDesk::node_id |
These variables are populated in IDecider::make_node.
std::vector<size_t>* forpy::DeciderDesk::node_to_featsel_p |
mu::variant<std::vector<float>, std::vector<double>, std::vector<uint32_t>, std::vector<uint8_t> >* forpy::DeciderDesk::node_to_thresh_v_p |
OptSplitV forpy::DeciderDesk::opt_res_v |
bool forpy::DeciderDesk::presorted |
id_t forpy::DeciderDesk::right_id |
Return values from IThreshOpt::optimize.
interv_t forpy::DeciderDesk::right_int |
Return values from IThreshOpt::optimize.
std::vector<id_t> forpy::DeciderDesk::sort_perm |
Variables initialized in IThreshOpt::full_entropy.
id_t* forpy::DeciderDesk::sort_perm_p |
Variables initialized in IThreshOpt::full_entropy.
id_t forpy::DeciderDesk::start_id |
These variables are populated in IDecider::make_node.
const float* forpy::DeciderDesk::weights_p |
Variables initialized in IThreshOpt::full_entropy.