|
Public Methods |
| | KMeans (float maxSize, float minSize, int initialK, int maxK, const std::string &clusterFileName="") |
| | clusterFileName refers to target file for new clustering data, which is very likely to be different from input file.
|
| | KMeans (std::istream &stream, const std::string &clusterFileName="") |
| | Construct from stream.
|
| virtual void | run (const std::vector< Vector< float > > &data) |
| | Peform clustering on collection of points.
|
| virtual int | classify (const Vector< float > &point) |
| | Determine the single best class of given point.
|
| virtual Vector< float > | distribution (const Vector< float > &point) |
| | Return a probability distribution over the classes. Row number in the returned Vector corresponds to class number.
|
| virtual int | classCount () |
| | Returns the number of classes.
|
| virtual Vector< float > | representative (int group) |
| | Return a representative member of group. "group" has same semantics as return value of classify (); we just can't use the word "class" because it is a keyword in C++. :).
|
| virtual void | read (std::istream &stream) |
| virtual void | write (std::ostream &stream, bool withName=false) |
| void | initialize (const std::vector< Vector< float > > &data) |
| void | estimate (const std::vector< Vector< float > > &data, Matrix< float > &member, int jbegin, int jend) |
| float | maximize (const std::vector< Vector< float > > &data, const Matrix< float > &member, int i) |
| bool | convergence (const std::vector< Vector< float > > &data, const Matrix< float > &member, float largestChange) |
Public Attributes |
| float | maxSize |
| | Largest length of dominant axis of covariance matrix. If any cluster exceeds this value, create a new cluster.
|
| float | minSize |
| | Closest that two clusters can be before they merge.
|
| int | initialK |
| | Lower bound on expected number of clusters.
|
| int | maxK |
| | Largest number of clusters allowed.
|
| std::vector< ClusterGauss > | clusters |
| std::vector< float > | changes |
| std::vector< float > | velocities |
| std::string | clusterFileName |
| time_t | clusterFileTime |
| | Time in seconds.
|
| off_t | clusterFileSize |