123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef RANDOMCLUSTERERNINCLUDE
- #define RANDOMCLUSTERERNINCLUDE
- #include <core/basics/Config.h>
- #include <core/vector/Distance.h>
- #include <core/vector/MatrixT.h>
- #include <core/vector/VectorT.h>
-
- #include "ClusterAlgorithm.h"
- namespace OBJREC {
-
-
- class RandomClustering : public ClusterAlgorithm
- {
- protected:
-
-
-
-
-
- int noClusters;
-
-
- std::string distanceType;
-
-
- NICE::VectorDistance<double> *distancefunction;
-
-
-
-
-
-
-
- double compute_assignments ( const NICE::VVector & features,
- const NICE::VVector & prototypes,
- std::vector<int> & assignment );
-
- double compute_weights ( const NICE::VVector & features,
- std::vector<double> & weights,
- std::vector<int> & assignment );
-
- int compute_prototypes ( const NICE::VVector & features,
- NICE::VVector & prototypes,
- std::vector<double> & weights,
- const std::vector<int> & assignment );
- public:
-
-
- RandomClustering( const int & _noClasses , const std::string & _distanceMode="euclidean" );
-
-
- RandomClustering( const NICE::Config *conf, const std::string & _section = "RandomClustering");
-
-
-
- virtual ~RandomClustering();
-
-
-
- void cluster ( const NICE::VVector & features,
- NICE::VVector & prototypes,
- std::vector<double> & weights,
- std::vector<int> & assignment );
- };
- }
- #endif
|