|
xapian-core
2.0.0
|
Kmeans clusterer: This clusterer implements the K-Means clustering algorithm. More...
#include <cluster.h>
Inheritance diagram for Xapian::KMeans:
Collaboration diagram for Xapian::KMeans:Public Member Functions | |
| KMeans (unsigned int k_, unsigned int max_iters_=0) | |
| Constructor specifying number of clusters and maximum iterations. More... | |
| ClusterSet | cluster (const MSet &mset) override |
| Implements the KMeans clustering algorithm. More... | |
| void | set_stopper (const Xapian::Stopper *stop=NULL) |
| Set the Xapian::Stopper object to be used for identifying stopwords. More... | |
| std::string | get_description () const override |
| Return a string describing this object. More... | |
Public Member Functions inherited from Xapian::Clusterer | |
| virtual | ~Clusterer () |
| Destructor. More... | |
| Clusterer * | release () |
| Start reference counting this object. More... | |
| const Clusterer * | release () const |
| Start reference counting this object. More... | |
Public Member Functions inherited from Xapian::Internal::opt_intrusive_base | |
| opt_intrusive_base (const opt_intrusive_base &) | |
| opt_intrusive_base & | operator= (const opt_intrusive_base &) |
| opt_intrusive_base () | |
| Construct object which is initially not reference counted. More... | |
| virtual | ~opt_intrusive_base () |
| void | ref () const |
| void | unref () const |
Private Member Functions | |
| void | initialise_clusters (ClusterSet &cset, Xapian::doccount num_of_points) |
| Initialise 'k' clusters by selecting 'k' centroids and assigning them to different clusters. More... | |
| void | initialise_points (const MSet &source) |
| Initialise the Points to be fed into the Clusterer with the MSet object 'source'. More... | |
Private Attributes | |
| std::vector< Point > | points |
| Contains the initialised points that are to be clustered. More... | |
| unsigned int | k |
| Specifies that the clusterer needs to form 'k' clusters. More... | |
| unsigned int | max_iters |
| Specifies the maximum number of iterations that KMeans will have. More... | |
| Xapian::Internal::opt_intrusive_ptr< const Xapian::Stopper > | stopper |
| Pointer to stopper object for identifying stopwords. More... | |
Additional Inherited Members | |
Public Attributes inherited from Xapian::Internal::opt_intrusive_base | |
| unsigned | _refs |
| Reference count. More... | |
Protected Member Functions inherited from Xapian::Internal::opt_intrusive_base | |
| void | release () const |
| Start reference counting. More... | |
Kmeans clusterer: This clusterer implements the K-Means clustering algorithm.
|
explicit |
Constructor specifying number of clusters and maximum iterations.
| k_ | Number of required clusters |
| max_iters_ | The maximum number of iterations for which KMeans will run if it doesn't converge |
|
overridevirtual |
Implements the KMeans clustering algorithm.
| mset | MSet object containing the documents that are to be clustered |
Implements Xapian::Clusterer.
|
overridevirtual |
Return a string describing this object.
Implements Xapian::Clusterer.
|
private |
Initialise 'k' clusters by selecting 'k' centroids and assigning them to different clusters.
| cset | ClusterSet object to be initialised by assigning centroids to each cluster |
| num_of_points | Number of points passed to clusterer |
|
private |
|
inline |
Set the Xapian::Stopper object to be used for identifying stopwords.
Stopwords are discarded while calculating term frequency for terms.
| stop | The Stopper object to set (default NULL, which means no stopwords) |
|
private |
|
private |
|
private |
|
private |