forpy
2
|
Stores the probability distributions for n_classes at a leaf. More...
#include <classificationleaf.h>
Public Member Functions | |
ClassificationLeaf (const uint &n_classes=0) | |
bool | operator== (const ILeaf &rhs) const |
const std::vector< Vec< float > > & | get_stored_dists () const |
const std::vector< Mat< float > > * | get_map () const |
Get all leafs. More... | |
std::shared_ptr< ILeaf > | create_duplicate () const |
Interface implementation. More... | |
bool | is_compatible_with (const IDataProvider &) |
Interface implementation. More... | |
bool | is_compatible_with (const IThreshOpt &threshopt) |
Interface implementation. More... | |
void | transfer_or_run_check (ILeaf *other, IThreshOpt *thresh_opt, IDataProvider *dprov) |
Interface implementation. More... | |
void | make_leaf (const TodoMark &todo_info, const IDataProvider &data_provider, Desk *desk) const |
Interface implementation. More... | |
size_t | get_result_columns (const size_t &n_trees=1, const bool &predict_proba=false, const bool &for_forest=false) const |
Interface implementation. More... | |
Data< Mat > | get_result_type (const bool &predict_proba, const bool &for_forest=false) const |
Interface implementation. More... | |
void | get_result (const id_t &node_id, Data< MatRef > &target_v, const bool &predict_proba, const bool &for_forest) const |
Interface implementation. More... | |
void | get_result (const std::vector< Data< Mat >> &leaf_results, Data< MatRef > &target_v, const Vec< float > &weights=Vec< float >(), const bool &predict_proba=false) const |
Interface implementation. More... | |
void | ensure_capacity (const size_t &n) |
Interface implementation. More... | |
void | finalize_capacity (const size_t &n) |
Interface implementation. More... | |
![]() | |
virtual | ~ILeaf () |
virtual Data< Mat > | get_result (const id_t &node_id, const bool &predict_proba=false, const bool &for_forest=false) const |
Get the leaf data for the leaf with the given id. More... | |
virtual Data< Mat > | get_result (const std::vector< Data< Mat >> &leaf_results, const Vec< float > &weights=Vec< float >(), const bool &predict_proba=false) const |
Combine leaf results of several trees with weights. More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const uint) |
Private Attributes | |
uint | n_classes |
std::shared_ptr< std::vector< uint > > | class_transl_ptr |
uint | true_max_class |
std::vector< Vec< float > > | stored_distributions |
Friends | |
class | cereal::access |
std::ostream & | operator<< (std::ostream &stream, const ClassificationLeaf &self) |
Additional Inherited Members | |
![]() | |
ILeaf () | |
Stores the probability distributions for n_classes at a leaf.
Definition at line 26 of file classificationleaf.h.
|
inlineexplicit |
n_classes | uint The number of classes. If set to 0, they're automatically inferred. |
Definition at line 32 of file classificationleaf.h.
|
inlinevirtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
Definition at line 40 of file classificationleaf.h.
|
inlinevirtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
Definition at line 72 of file classificationleaf.h.
|
inlinevirtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
Definition at line 75 of file classificationleaf.h.
|
inlinevirtual |
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
const std::vector<Vec<float> >& forpy::ClassificationLeaf::get_stored_dists | ( | ) | const |
|
inlinevirtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
Definition at line 43 of file classificationleaf.h.
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
|
virtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
|
virtual |
Reimplemented from forpy::ILeaf.
|
inlineprivate |
Definition at line 93 of file classificationleaf.h.
|
inlinevirtual |
Interface implementation.
Reimplemented from forpy::ILeaf.
Definition at line 47 of file classificationleaf.h.
|
friend |
Definition at line 88 of file classificationleaf.h.
|
friend |
Definition at line 79 of file classificationleaf.h.
|
private |
Definition at line 99 of file classificationleaf.h.
|
private |
Definition at line 96 of file classificationleaf.h.
|
private |
Definition at line 101 of file classificationleaf.h.
|
private |
Definition at line 100 of file classificationleaf.h.