forpy 2

Public Member Functions | Protected Member Functions | Private Member Functions | Friends | List of all members
forpy::IThreshOpt Class Reference
Threshold Optimizers

Find an optimal threshold. More...

`#include <ithreshopt.h>`

Inheritance diagram for forpy::IThreshOpt:

## Public Member Functions
virtual | ~IThreshOpt ()
virtual std::shared_ptr< IThreshOpt > | create_duplicate (const uint &random_seed) const VIRTUAL_PTR
virtual bool | supports_weights () const
| Whether this threshold optimizer can take into account weights during the optimization. More...
virtual void | check_annotations (IDataProvider *dprov) VIRTUAL_VOID
| Validate annotations for usability with this optimizer. More...
virtual void | transfer_or_run_check (IThreshOpt *other, IDataProvider *dprov) VIRTUAL_VOID
virtual void | full_entropy (const IDataProvider &dprov, Desk *) const VIRTUAL_VOID
| Get the full entropy for one node before optimization. More...
virtual void | optimize (Desk *) const VIRTUAL_VOID
| Optimize for one node. More...
virtual float | get_gain_threshold_for (const size_t &node_id) VIRTUAL(float)
| Get the gain threshold to use for this node. More...
virtual bool | operator== (const IThreshOpt &rhs) const VIRTUAL(bool)

## Protected Member Functions
| IThreshOpt ()

## Private Member Functions
template<class Archive >
void | serialize (Archive &, const uint &)

## Friends
class | cereal::access

## Detailed Description

Find an optimal threshold.

This class is classically used by a forpy::IDecider to optimize the threshold ( \(\tau\)).

Definition at line 23 of file ithreshopt.h.

## Constructor & Destructor Documentation

## ◆ ~IThreshOpt()

virtual forpy::IThreshOpt::~IThreshOpt | ( |  | ) |
| inline virtual

Definition at line 25 of file ithreshopt.h.

## ◆ IThreshOpt()

forpy::IThreshOpt::IThreshOpt | ( |  | ) |
| inline protected

For deserialization.

Definition at line 61 of file ithreshopt.h.

## Member Function Documentation

## ◆ check_annotations()

virtual void forpy::IThreshOpt::check_annotations | ( | IDataProvider * | dprov | ) |
| virtual

Validate annotations for usability with this optimizer.

Reimplemented in forpy::ClassificationOpt, and forpy::RegressionOpt.

## ◆ create_duplicate()

virtual std::shared_ptr<IThreshOpt> forpy::IThreshOpt::create_duplicate | ( | const uint & | random_seed | ) | const
| virtual

Reimplemented in forpy::ClassificationOpt, forpy::RegressionOpt, and forpy::FastClassOpt.

## ◆ full_entropy()

virtual void forpy::IThreshOpt::full_entropy | ( | const IDataProvider & | dprov,
|  | Desk * |
| ) |  | const
| virtual

Get the full entropy for one node before optimization.

Setup tasks can be performed within this function. If the entropy determined is below a certain threshold, the optimization is stopped (see, e.g., forpy::FastDecider).

Reimplemented in forpy::ClassificationOpt, forpy::RegressionOpt, and forpy::FastClassOpt.

## ◆ get_gain_threshold_for()

virtual float forpy::IThreshOpt::get_gain_threshold_for | ( | const size_t & | node_id | ) |
| virtual

Get the gain threshold to use for this node.

Reimplemented in forpy::ClassificationOpt, and forpy::RegressionOpt.

## ◆ operator==()

virtual bool forpy::IThreshOpt::operator== | ( | const IThreshOpt & | rhs | ) | const
| virtual

Reimplemented in forpy::ClassificationOpt, forpy::RegressionOpt, and forpy::FastClassOpt.

## ◆ optimize()

virtual void forpy::IThreshOpt::optimize | ( | Desk * |  | ) | const
| virtual

Optimize for one node.

Reimplemented in forpy::ClassificationOpt, forpy::RegressionOpt, and forpy::FastClassOpt.

## ◆ serialize()

template<class Archive >

void forpy::IThreshOpt::serialize | ( | Archive & | ,
|  | const uint & |
| ) |  |
| inline private

Definition at line 66 of file ithreshopt.h.

## ◆ supports_weights()

virtual bool forpy::IThreshOpt::supports_weights | ( |  | ) | const
| inline virtual

Whether this threshold optimizer can take into account weights during the optimization.

By default, return false.

Definition at line 34 of file ithreshopt.h.

## ◆ transfer_or_run_check()

virtual void forpy::IThreshOpt::transfer_or_run_check | ( | IThreshOpt * | other,
|  | IDataProvider * | dprov
| ) |  |
| virtual

Reimplemented in forpy::ClassificationOpt, and forpy::RegressionOpt.

## Friends And Related Function Documentation

## ◆ cereal::access

friend class cereal::access
| friend

Definition at line 61 of file ithreshopt.h.

The documentation for this class was generated from the following file:

- /Users/classner/git/forpy/include/forpy/threshold_optimizers/ithreshopt.h