|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.ProcessingComponentBase
org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
public class BisectingKMeansClusteringAlgorithm
A very simple implementation of bisecting k-means clustering. Unlike other algorithms in Carrot2, this one creates hard clusterings (one document belongs only to one cluster). On the other hand, the clusters are labeled only with individual words that may not always fully correspond to all documents in the cluster.
| Field Summary | |
|---|---|
int |
clusterCount
The number of clusters to create. |
List<Cluster> |
clusters
|
List<Document> |
documents
|
int |
labelCount
Label count. |
LabelFormatter |
labelFormatter
Cluster label formatter, contains bindable attributes. |
TermDocumentMatrixBuilder |
matrixBuilder
Term-document matrix builder for the algorithm, contains bindable attributes. |
TermDocumentMatrixReducer |
matrixReducer
Term-document matrix reducer for the algorithm, contains bindable attributes. |
int |
maxIterations
The maximum number of k-means iterations to perform. |
int |
partitionCount
Partition count. |
BasicPreprocessingPipeline |
preprocessingPipeline
Common preprocessing tasks handler, contains bindable attributes. |
boolean |
useDimensionalityReduction
Use dimensionality reduction. |
| Constructor Summary | |
|---|---|
BisectingKMeansClusteringAlgorithm()
|
|
| Method Summary | |
|---|---|
void |
process()
Performs the processing required to fulfill the request. |
| Methods inherited from class org.carrot2.core.ProcessingComponentBase |
|---|
afterProcessing, beforeProcessing, dispose, getContext, getSharedExecutor, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.carrot2.core.IProcessingComponent |
|---|
afterProcessing, beforeProcessing, dispose, init |
| Field Detail |
|---|
public List<Document> documents
public List<Cluster> clusters
public int clusterCount
public int maxIterations
public boolean useDimensionalityReduction
true, k-means will be applied on the
dimensionality-reduced term-document matrix with the number of dimensions being
equal to the number of requested clusters. If false, the k-means will
be performed directly on the original term-document matrix.
public int partitionCount
public int labelCount
public final BasicPreprocessingPipeline preprocessingPipeline
public final TermDocumentMatrixBuilder matrixBuilder
public final TermDocumentMatrixReducer matrixReducer
public final LabelFormatter labelFormatter
| Constructor Detail |
|---|
public BisectingKMeansClusteringAlgorithm()
| Method Detail |
|---|
public void process()
throws ProcessingException
IProcessingComponent
process in interface IProcessingComponentprocess in class ProcessingComponentBaseProcessingException - when processing failed. If thrown, the
IProcessingComponent.afterProcessing() method will be called and the component will
be ready to accept further requests or to be disposed of. Finally, the
exception will be rethrown from the controller method that caused the
component to perform processing.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||