123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef MUTUALINFORMATIONINCLUDE
- #define MUTUALINFORMATIONINCLUDE
- #include "core/vector/VVector.h"
- #include "vislearning/cbaselib/LabeledSet.h"
- namespace OBJREC {
- class MutualInformation
- {
- protected:
-
- bool verbose;
-
- void addStatistics ( const std::vector<NICE::Vector *> & v, size_t d, double threshold, size_t & ones ) const;
-
-
- double entropy ( size_t n1, size_t n2 ) const;
- public:
-
-
- MutualInformation( bool verbose = false );
-
-
- virtual ~MutualInformation();
-
-
- double mutualInformationOverall ( const LabeledSetVector & ls, size_t dimension, double threshold ) const;
- double mutualInformationClass ( const LabeledSetVector & ls, size_t classno, size_t dimension, double threshold ) const;
-
-
- double computeThresholdOverall ( const LabeledSetVector & ls, size_t dimension, double & opt_threshold ) const;
- double computeThresholdClass ( const LabeledSetVector & ls, size_t classno, size_t dimension, double & opt_threshold ) const;
-
- void computeThresholdsOverall ( const LabeledSetVector & ls, NICE::Vector & thresholds, NICE::Vector & mis ) const;
- void computeThresholdsClass ( const LabeledSetVector & ls, size_t classno, NICE::Vector & thresholds, NICE::Vector & mis ) const;
-
- };
- }
- #endif
|