forpy
2
|
Computes the induced p entropy. More...
#include <inducedentropy.h>
Public Member Functions | |
InducedEntropy (const float &p) | |
~InducedEntropy () | |
virtual float | operator() (const float *class_members_numbers, const size_t &n, const float &fsum) const |
bool | operator== (const IEntropyFunction &rhs) const |
float | get_p () const |
![]() | |
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 | |
InducedEntropy () | |
template<class Archive > | |
void | serialize (Archive &ar, const uint &) |
DISALLOW_COPY_AND_ASSIGN (InducedEntropy) | |
Private Attributes | |
float | p |
Friends | |
class | cereal::access |
std::ostream & | operator<< (std::ostream &stream, const InducedEntropy &self) |
Additional Inherited Members | |
![]() | |
IEntropyFunction () | |
Computes the induced p entropy.
Works correctly up to a total sum of elements of numeric_limits<float>::max().
This is the induced p-metric of the vector of \(n\) class probabilities and the point of maximum unorder (the vector with all entries \(\frac{1}{n}\)) in the n-dimensional space without applying the root. It is equal to the Gini-measure for \(p=2\).
The definition for \(c\) classes:
\[\sum_{i=1}^{c} \left\Vert p_i - \frac{1}{c}\right\Vert ^p\]
.
The differential entropy for a normal distribution with covariance matrix \(\Sigma\) in \(n\) dimensions is defined as:
\[\frac{1}{\sqrt{p^n}}\cdot\left(\sqrt{2\pi}^n\cdot\sqrt{\left|\Sigma\right|}\right)^{-(p-1)}\]
In the differential normal case, the most useful values for \(p\) are very close to 1 (e.g. 1.00001)! \(p=2\) is already equivalent to the infinite norm!
Definition at line 42 of file inducedentropy.h.
|
inlineexplicit |
Definition at line 44 of file inducedentropy.h.
|
inline |
Definition at line 49 of file inducedentropy.h.
|
inlineprivate |
Definition at line 105 of file inducedentropy.h.
|
private |
|
inline |
Definition at line 102 of file inducedentropy.h.
|
inlinevirtual |
Reimplemented from forpy::IEntropyFunction.
Definition at line 51 of file inducedentropy.h.
|
inlinevirtual |
Deep equality comparison.
Reimplemented from forpy::IEntropyFunction.
Definition at line 92 of file inducedentropy.h.
|
inlineprivate |
Definition at line 109 of file inducedentropy.h.
|
friend |
Definition at line 105 of file inducedentropy.h.
|
friend |
Definition at line 86 of file inducedentropy.h.
|
private |
Definition at line 114 of file inducedentropy.h.