forpy 2

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

Computes the Renyi entropy. More...

`#include <renyientropy.h>`

Inheritance diagram for forpy::RenyiEntropy:

## Public Member Functions
| RenyiEntropy (const float &alpha)
| ~RenyiEntropy ()
virtual float | operator() (const float *class_members_numbers, const size_t &n, const float &fsum) const
bool | operator== (const IEntropyFunction &rhs) const
float | get_alpha () const
Public Member Functions inherited from forpy::IEntropyFunction
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 std::vector< float > &class_members_numbers) const
| Classical entropy calculation function. More...

## Private Member Functions
| RenyiEntropy ()
| DON'T USE. Non-initializing constructor for serialization purposes. More...
template<class Archive >
void | serialize (Archive &ar, const uint &)
| DISALLOW_COPY_AND_ASSIGN (RenyiEntropy)

## Private Attributes
float | q
std::unique_ptr< ShannonEntropy > | shannon_entropy
std::unique_ptr< InducedEntropy > | induced_p
std::unique_ptr< ClassificationError > | classification_error

## Friends
class | cereal::access
std::ostream & | operator<< (std::ostream &stream, const RenyiEntropy &self)

## Additional Inherited Members
Protected Member Functions inherited from forpy::IEntropyFunction
| IEntropyFunction ()

## Detailed Description

Computes the Renyi entropy.

Works correctly up to a total sum of elements of numeric_limits<float>::max().

This is the Renyi entropy, as introduced by Alfred Renyi (see http://en.wikipedia.org/wiki/R%C3%A9nyi_entropy).

Definition at line 34 of file renyientropy.h.

## Constructor & Destructor Documentation

## ◆ RenyiEntropy() [1/2]

forpy::RenyiEntropy::RenyiEntropy | ( | const float & | alpha | ) |
| explicit

## ◆ ~RenyiEntropy()

forpy::RenyiEntropy::~RenyiEntropy | ( |  | ) |
| inline

Definition at line 37 of file renyientropy.h.

## ◆ RenyiEntropy() [2/2]

forpy::RenyiEntropy::RenyiEntropy | ( |  | ) |
| inline private

DON'T USE. Non-initializing constructor for serialization purposes.

Definition at line 89 of file renyientropy.h.

## Member Function Documentation

## ◆ DISALLOW_COPY_AND_ASSIGN()

forpy::RenyiEntropy::DISALLOW_COPY_AND_ASSIGN | ( | RenyiEntropy |  | ) |
| private

## ◆ get_alpha()

float forpy::RenyiEntropy::get_alpha | ( |  | ) | const

Returns the alpha value set in the constructor.

## ◆ operator()()

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

Reimplemented from forpy::IEntropyFunction.

Definition at line 39 of file renyientropy.h.

## ◆ operator==()

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

Deep equality comparison.

Reimplemented from forpy::IEntropyFunction.

## ◆ serialize()

template<class Archive >

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

Definition at line 93 of file renyientropy.h.

## Friends And Related Function Documentation

## ◆ cereal::access

friend class cereal::access
| friend

Definition at line 89 of file renyientropy.h.

## ◆ operator<<

std::ostream& operator<< | ( | std::ostream & | stream,
|  | const RenyiEntropy & | self
| ) |  |
| friend

Definition at line 76 of file renyientropy.h.

## Member Data Documentation

## ◆ classification_error

std::unique_ptr<ClassificationError> forpy::RenyiEntropy::classification_error
| private

Definition at line 102 of file renyientropy.h.

## ◆ induced_p

std::unique_ptr<InducedEntropy> forpy::RenyiEntropy::induced_p
| private

Definition at line 101 of file renyientropy.h.

## ◆ q

float forpy::RenyiEntropy::q
| private

Definition at line 97 of file renyientropy.h.

## ◆ shannon_entropy

std::unique_ptr<ShannonEntropy> forpy::RenyiEntropy::shannon_entropy
| private

Definition at line 100 of file renyientropy.h.

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

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