#include <ClusterDB.hpp>
Inheritance diagram for lemur::api::ClusterDB:

Public Member Functions | |
| ClusterDB (const Index *ind, double threshold=0.25, enum ClusterParam::simTypes simType=ClusterParam::COS, enum ClusterParam::clusterTypes clusterType=ClusterParam::CENTROID, enum ClusterParam::docModes docMode=ClusterParam::DMAX) | |
| initialize the cluster method | |
| virtual | ~ClusterDB () |
| clean up | |
| virtual int | countClusters () const =0 |
| Return number of clusters. | |
| virtual int | maxID () const =0 |
| Return highest cluster ID. | |
| virtual vector< lemur::cluster::Cluster * > | getDocCluster (lemur::api::DOCID_T docId) const =0 |
| Get the Cluster for the given docId. | |
| virtual lemur::cluster::Cluster * | getCluster (int clusterId) const =0 |
| Get the Cluster for the given clusterId. | |
| virtual vector< int > | getDocClusterId (lemur::api::DOCID_T docId) const =0 |
| Get the Cluster id for the given docId. | |
| virtual int | addToCluster (lemur::api::DOCID_T docId, int clusterId, double score)=0 |
| Add a document id to a cluster, given the cluster id. | |
| virtual int | addToCluster (lemur::api::DOCID_T docId, lemur::cluster::Cluster *cluster, double score)=0 |
| Add a document id to a cluster, given the cluster. | |
| virtual int | removeFromCluster (lemur::api::DOCID_T docId, int clusterID)=0 |
| Remove a document id from a cluster, given the cluster id. | |
| virtual int | deleteCluster (int clusterID)=0 |
| Delete a cluster entirely. | |
| virtual int | deleteCluster (lemur::cluster::Cluster *target)=0 |
| Delete a cluster entirely. | |
| int | addCluster (lemur::cluster::Cluster *oldCluster) |
| Add a cluster to the DB (renumbers the cluster id). Returns new id. | |
| virtual vector< int > | splitCluster (int cid, int num=2)=0 |
| split cluster using Cluster::split | |
| virtual int | mergeClusters (int cid1, int cid2)=0 |
| merge two clusters. | |
| virtual void | printClusters () const |
| pretty print all clusters to the standard output. | |
| virtual int | cluster (lemur::api::DOCID_T docId) |
| Assign a document to a cluster. | |
| virtual int | cluster (lemur::api::DOCID_T docId, double &finalScore) |
| Assign a document to a cluster, returning score. | |
| virtual string | getKeyWords (int cid, int numTerms=10) const |
| Get the top N keywords for a cluster. | |
Protected Member Functions | |
| virtual lemur::cluster::Cluster * | newCluster ()=0 |
| subclass specific cluster intitialization. | |
| lemur::cluster::Cluster * | allocateCluster (int clusterID) const |
| Uses ClusterFactory to create Cluster objects. | |
Protected Attributes | |
| const Index * | index |
| Database containing the collection to operate on. | |
| int | numDocs |
| Number of documents in the database, reduces calls to db->docCount(). | |
| int | numTerms |
| Number of terms in the database. | |
| double | threshold |
| threshold for YES/NO decisions | |
| vector< lemur::cluster::Cluster * > | clusters |
| the cluster database. | |
| const lemur::cluster::SimilarityMethod * | sim |
| Similarity method to use. | |
| lemur::cluster::ClusterFactory * | factory |
| Cluster factory. | |
| lemur::cluster::ThresholdFcn * | thresh |
| Threshold function for adaptive thresholding. | |
|
||||||||||||||||||||||||
|
initialize the cluster method
|
|
|
clean up
|
|
|
Add a cluster to the DB (renumbers the cluster id). Returns new id.
|
|
||||||||||||||||
|
Add a document id to a cluster, given the cluster.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
||||||||||||||||
|
Add a document id to a cluster, given the cluster id.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Uses ClusterFactory to create Cluster objects.
|
|
||||||||||||
|
Assign a document to a cluster, returning score.
|
|
|
Assign a document to a cluster.
|
|
|
Return number of clusters.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Delete a cluster entirely.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Delete a cluster entirely.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Get the Cluster for the given clusterId.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Get the Cluster for the given docId.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
Get the Cluster id for the given docId.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
||||||||||||
|
Get the top N keywords for a cluster.
|
|
|
Return highest cluster ID.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
||||||||||||
|
merge two clusters.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
subclass specific cluster intitialization.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
pretty print all clusters to the standard output.
|
|
||||||||||||
|
Remove a document id from a cluster, given the cluster id.
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
||||||||||||
|
split cluster using Cluster::split
Implemented in lemur::cluster::FlatFileClusterDB, and lemur::cluster::KeyfileClusterDB. |
|
|
the cluster database.
|
|
|
Cluster factory.
|
|
|
Database containing the collection to operate on.
|
|
|
Number of documents in the database, reduces calls to db->docCount().
|
|
|
Number of terms in the database.
|
|
|
Similarity method to use.
|
|
|
Threshold function for adaptive thresholding.
|
|
|
threshold for YES/NO decisions
|
1.3.4