3 #ifndef FORPY_THRESHOLD_OPTIMIZERS_REGOPT_H_ 4 #define FORPY_THRESHOLD_OPTIMIZERS_REGOPT_H_ 7 #include "../util/serialization/basics.h" 10 #include "../util/desk.h" 15 #pragma clang diagnostic push 16 #pragma clang diagnostic ignored "-Wunused-variable" 33 #ifdef FORPY_SKLEARN_COMPAT 38 #pragma clang diagnostic pop 69 const uint & )
const {
84 inline friend std::ostream &
operator<<(std::ostream &stream,
86 stream <<
"forpy::RegressionOpt";
97 template <
class Archive>
99 ar(cereal::make_nvp(
"base", cereal::base_class<IThreshOpt>(
this)),
111 #endif // FORPY_THRESHOLD_OPTIMIZERS_REGOPT_H_ Find an optimal threshold.
Desk for decider training.
SplitOptRes< float > & optimize__setup(DeciderDesk &d) const
A data provider for the training of one tree.
void serialize(Archive &ar, const uint &)
RegressionOpt(const size_t &n_thresholds=0, const float &gain_threshold=1E-7f)
float get_gain_threshold_for(const size_t &)
Interface implementation.
Optimize split thresholds to optimize regression results (MSE).
const bool LOG_ROPT_ALLN
Variables to control debugging and log output for the forpy::RegressionOpt.
CEREAL_REGISTER_TYPE(forpy::RegressionOpt)
void check_annotations(IDataProvider *dprov)
Interface implementation.
void transfer_or_run_check(IThreshOpt *other, IDataProvider *dprov)
Interface implementation.
friend std::ostream & operator<<(std::ostream &stream, const RegressionOpt &)
void full_entropy(const IDataProvider &dprov, Desk *) const
Interface implementation.
void optimize(Desk *) const
Interface implementation.
virtual std::shared_ptr< IThreshOpt > create_duplicate(const uint &) const
Interface implementation.
DISALLOW_COPY_AND_ASSIGN(RegressionOpt)
bool operator==(const IThreshOpt &rhs) const
void optimize__sort(DeciderDesk &d) const
const size_t LOG_ROPT_NID
Variables to control debugging and log output for the forpy::RegressionOpt.
std::unique_ptr< std::vector< float > > optimize__thresholds(Desk *d) const
const float REGOPT_EPS
Regression epsilon. No differences less than this are considered existent. This is relevant for: ...
friend class cereal::access
const int DLOG_ROPT_V
Variables to control debugging and log output for the forpy::RegressionOpt.
unsigned int uint
Convenience typedef for unsigned int.