3 #ifndef FORPY_THRESHOLD_OPTIMIZERS_FASTCLASSOPT_H_ 4 #define FORPY_THRESHOLD_OPTIMIZERS_FASTCLASSOPT_H_ 7 #include "../util/serialization/basics.h" 9 #include "../impurities/ientropyfunction.h" 10 #include "../impurities/shannonentropy.h" 12 #include "../util/desk.h" 18 #pragma clang diagnostic push 19 #pragma clang diagnostic ignored "-Wunused-variable" 55 const uint & )
const {
62 inline friend std::ostream &
operator<<(std::ostream &stream,
64 stream <<
"forpy::FastClassOpt";
70 template <
typename IT>
72 template <
typename IT>
74 template <
typename IT>
77 template <
class Archive>
79 ar(cereal::make_nvp(
"base", cereal::base_class<ClassificationOpt>(
this)));
92 #endif // FORPY_THRESHOLD_OPTIMIZERS_FASTCLASSOPT_H_ friend std::ostream & operator<<(std::ostream &stream, const FastClassOpt &)
Find an optimal threshold.
Desk for decider training.
void serialize(Archive &ar, const uint &)
A data provider for the training of one tree.
friend class cereal::access
DISALLOW_COPY_AND_ASSIGN(FastClassOpt)
const bool LOG_FCOPT_ALLN
Variables to control debugging and log output for the forpy::RegressionOpt.
void optimize(Desk *) const
Interface implementation.
const size_t LOG_FCOPT_NID
Variables to control debugging and log output for the forpy::RegressionOpt.
std::shared_ptr< std::vector< uint > > class_transl_ptr
Optimize split thresholds to optimize classification results.
const int DLOG_FCOPT_V
Variables to control debugging and log output for the forpy::RegressionOpt.
void optimize__sort(DeciderDesk &d) const
SplitOptRes< IT > & optimize__setup(DeciderDesk &d) const
std::unique_ptr< std::vector< IT > > optimize__thresholds(Desk *d) const
Optimize split thresholds to optimize classification results.
bool operator==(const IThreshOpt &rhs) const
void full_entropy(const IDataProvider &dprov, Desk *) const
Interface implementation.
virtual std::shared_ptr< IThreshOpt > create_duplicate(const uint &) const
Interface implementation.
unsigned int uint
Convenience typedef for unsigned int.
CEREAL_REGISTER_TYPE(forpy::FastClassOpt)
FastClassOpt(const size_t &n_thresholds=0, const float &gain_threshold=1E-7f)