CluE
1.0
|
KumarSabharwalSen algorithm. More...
#include <kumarsabharwalsen.h>
Classes | |
struct | Tupel |
Used to return a DoubleSolution and its cost. More... | |
Public Member Functions | |
KumarSabharwalSen (DissimilarityMeasure< T > const *measure=0, ProxyGenerator< T > const *centroidGenerator=0, unsigned int numberOfClusters=2, std::vector< T * > const *input=0) | |
Constructor for general usage. More... | |
KumarSabharwalSen (const KumarSabharwalSen< T > &) | |
KumarSabharwalSen< T > & | operator= (const KumarSabharwalSen< T > &) |
virtual | ~KumarSabharwalSen () |
virtual DoubleSolution< T > * | compute () |
double | getLastCost () |
Returns the cost of the last computation. More... | |
virtual void | setInput (std::vector< T * > const *) |
virtual void | setMeasure (DissimilarityMeasure< T > const *measure) |
void | setCentroidGenerator (ProxyGenerator< T > const *centroidGenerator) |
Set the centroid generator used for cluster center approximation. More... | |
void | setSetSizes (unsigned int superSetSize, unsigned int subsetSize) |
Set the superset and subset sizes used for guessing clusters. More... | |
![]() | |
virtual | ~Algorithm () |
Static Public Member Functions | |
static KumarSabharwalSen< T > * | toKumarSabharwalSen (Algorithm *s) |
does a dynamic cast of the given Algorithm to FarthestFirstTraversal<T> More... | |
Private Member Functions | |
Tupel | irredKMeans (std::set< T * > Q, size_t m, size_t k, std::map< size_t, T > C, double Sum) |
Private Attributes | |
DissimilarityMeasure< T > * | measure |
std::set< T * > | input |
ProxyGenerator< T > * | centroidGenerator |
unsigned int | superSetSize |
unsigned int | subsetSize |
unsigned int | numberOfClusters |
double | lastCost |
KumarSabharwalSen algorithm.
Approxmative (1+epsilon) clustering algorithm as described in A. Kumar, Y. Sabharwal and S. Sen. "A Simple Linear Time (1+epsilon)-Approximation Algorithm for k-Means Clustering in Any Dimensions". ???, 2005.
Definition at line 31 of file kumarsabharwalsen.h.
CluE::KumarSabharwalSen< T >::KumarSabharwalSen | ( | DissimilarityMeasure< T > const * | measure = 0 , |
ProxyGenerator< T > const * | centroidGenerator = 0 , |
||
unsigned int | numberOfClusters = 2 , |
||
std::vector< T * > const * | input = 0 |
||
) |
Constructor for general usage.
Definition at line 112 of file kumarsabharwalsen.h.
CluE::KumarSabharwalSen< T >::KumarSabharwalSen | ( | const KumarSabharwalSen< T > & | kss | ) |
Definition at line 124 of file kumarsabharwalsen.h.
|
virtual |
Definition at line 155 of file kumarsabharwalsen.h.
KumarSabharwalSen< T > & CluE::KumarSabharwalSen< T >::operator= | ( | const KumarSabharwalSen< T > & | kss | ) |
Definition at line 135 of file kumarsabharwalsen.h.
|
virtual |
InvalidRuntimeConfigurationException | [0] Number of desired clusters is 0. |
InvalidRuntimeConfigurationException | [1] Input size must be larger than number of desired clusters. |
InvalidRuntimeConfigurationException | [2] Set sizes are uninitialized. |
Implements CluE::Algorithm.
Definition at line 163 of file kumarsabharwalsen.h.
double CluE::KumarSabharwalSen< T >::getLastCost | ( | ) |
Returns the cost of the last computation.
Definition at line 315 of file kumarsabharwalsen.h.
|
virtual |
Implements CluE::InputSetter< T >.
Definition at line 320 of file kumarsabharwalsen.h.
|
virtual |
Implements CluE::MeasureSetter< T >.
Definition at line 326 of file kumarsabharwalsen.h.
void CluE::KumarSabharwalSen< T >::setCentroidGenerator | ( | ProxyGenerator< T > const * | centroidGenerator | ) |
Set the centroid generator used for cluster center approximation.
Definition at line 334 of file kumarsabharwalsen.h.
void CluE::KumarSabharwalSen< T >::setSetSizes | ( | unsigned int | superSetSize, |
unsigned int | subsetSize | ||
) |
Set the superset and subset sizes used for guessing clusters.
InvalidArgumentException | [0] subsetSize has to be smaller than superSetSize. subsetSize. |
Definition at line 342 of file kumarsabharwalsen.h.
|
static |
does a dynamic cast of the given Algorithm to FarthestFirstTraversal<T>
Definition at line 352 of file kumarsabharwalsen.h.
|
private |
Definition at line 184 of file kumarsabharwalsen.h.
|
private |
Definition at line 103 of file kumarsabharwalsen.h.
|
private |
Definition at line 104 of file kumarsabharwalsen.h.
|
private |
Definition at line 105 of file kumarsabharwalsen.h.
|
private |
Definition at line 106 of file kumarsabharwalsen.h.
|
private |
Definition at line 107 of file kumarsabharwalsen.h.
|
private |
Definition at line 108 of file kumarsabharwalsen.h.
|
private |
Definition at line 109 of file kumarsabharwalsen.h.