forpy 2

Public Member Functions | Protected Member Functions | Private Member Functions | Friends | List of all members
forpy::IEntropyFunction Class Reference
Impurity Measures

Interface for an entropy calculation functor. More...

`#include <ientropyfunction.h>`

Inheritance diagram for forpy::IEntropyFunction:

## Public Member Functions
virtual | ~IEntropyFunction ()
virtual float | operator() (const std::vector< float > &class_members_numbers, const float &fsum) const
| The interface function that must be implemented. More...
virtual float | operator() (const float *class_members_numbers, const size_t &n, const float &fsum) const VIRTUAL(float)
virtual float | operator() (const std::vector< float > &class_members_numbers) const
| Classical entropy calculation function. More...
virtual bool | operator== (const IEntropyFunction &rhs) const VIRTUAL(bool)

## Protected Member Functions
| IEntropyFunction ()

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

## Friends
class | cereal::access

## Detailed Description

Interface for an entropy calculation functor.

Definition at line 26 of file ientropyfunction.h.

## Constructor & Destructor Documentation

## ◆ ~IEntropyFunction()

virtual forpy::IEntropyFunction::~IEntropyFunction | ( |  | ) |
| virtual

## ◆ IEntropyFunction()

forpy::IEntropyFunction::IEntropyFunction | ( |  | ) |
| protected

## Member Function Documentation

## ◆ DISALLOW_COPY_AND_ASSIGN()

forpy::IEntropyFunction::DISALLOW_COPY_AND_ASSIGN | ( | IEntropyFunction |  | ) |
| private

## ◆ operator()() [1/3]

virtual float forpy::IEntropyFunction::operator() | ( | const std::vector< float > & | class_members_numbers,
|  | const float & | fsum
| ) |  | const
| inline virtual

The interface function that must be implemented.

Calculates the entropy from a given class distribution. For maximum efficiency, the total weight of samples may be provided as float.

Parameters

  class_members_numbers | Class distribution histogram.
  fsum | The total number/weight of samples.

Returns
  The calculated entropy value.

Definition at line 40 of file ientropyfunction.h.

## ◆ operator()() [2/3]

virtual float forpy::IEntropyFunction::operator() | ( | const float * | class_members_numbers,
|  | const size_t & | n,
|  | const float & | fsum
| ) |  | const
| virtual

Reimplemented in forpy::InducedEntropy, forpy::TsallisEntropy, forpy::RenyiEntropy, forpy::ShannonEntropy, and forpy::ClassificationError.

## ◆ operator()() [3/3]

virtual float forpy::IEntropyFunction::operator() | ( | const std::vector< float > & | class_members_numbers | ) | const
| virtual

Classical entropy calculation function.

Is implemented already and provides a shortcut for for the standard function by calculating the sum of the class distribution.

Parameters

  class_members_numbers | Class distribution histogram.

Returns
  The calculated entropy value.

## ◆ operator==()

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

Deep equality comparison.

Reimplemented in forpy::InducedEntropy, forpy::RenyiEntropy, forpy::TsallisEntropy, forpy::ShannonEntropy, and forpy::ClassificationError.

## ◆ serialize()

template<class Archive >

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

Definition at line 73 of file ientropyfunction.h.

## Friends And Related Function Documentation

## ◆ cereal::access

friend class cereal::access
| friend

Definition at line 71 of file ientropyfunction.h.

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

- /Users/classner/git/forpy/include/forpy/impurities/ientropyfunction.h