xapian-core  1.5.0
Public Member Functions | List of all members
Xapian::KMeans Class Reference

Kmeans clusterer: This clusterer implements the K-Means clustering algorithm. More...

+ Inheritance 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)
 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
 Return a string describing this object.
 
- Public Member Functions inherited from Xapian::Clusterer
virtual ~Clusterer ()
 Destructor.
 
Clustererrelease ()
 Start reference counting this object. More...
 
const Clustererrelease () const
 Start reference counting this object. More...
 

Detailed Description

Kmeans clusterer: This clusterer implements the K-Means clustering algorithm.

Constructor & Destructor Documentation

◆ KMeans()

Xapian::KMeans::KMeans ( unsigned int  k_,
unsigned int  max_iters_ = 0 
)
explicit

Constructor specifying number of clusters and maximum iterations.

Parameters
k_Number of required clusters
max_iters_The maximum number of iterations for which KMeans will run if it doesn't converge

Member Function Documentation

◆ cluster()

ClusterSet Xapian::KMeans::cluster ( const MSet mset)
virtual

Implements the KMeans clustering algorithm.

Parameters
msetMSet object containing the documents that are to be clustered

Implements Xapian::Clusterer.

◆ set_stopper()

void Xapian::KMeans::set_stopper ( const Xapian::Stopper stop = NULL)

Set the Xapian::Stopper object to be used for identifying stopwords.

Stopwords are discarded while calculating term frequency for terms.

Parameters
stopThe Stopper object to set (default NULL, which means no stopwords)

The documentation for this class was generated from the following file: