|
Carrot2 v3.5.2
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.clustering.lingo.SimpleLabelAssigner
public class SimpleLabelAssigner
A simple and fast label assigner. For each base vector chooses the label that maximizes the base vector--label term vector cosine similarity. Different vectors can get the same label assigned, which means the number of final labels (after duplicate removal) may be smaller than the number of base vectors on input.
UniqueLabelAssigner| Constructor Summary | |
|---|---|
SimpleLabelAssigner()
|
|
| Method Summary | |
|---|---|
void |
assignLabels(LingoProcessingContext context,
org.apache.mahout.math.matrix.DoubleMatrix2D stemCos,
com.carrotsearch.hppc.IntIntOpenHashMap filteredRowToStemIndex,
org.apache.mahout.math.matrix.DoubleMatrix2D phraseCos)
Assigns labels to base vectors found by the matrix factorization. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleLabelAssigner()
| Method Detail |
|---|
public void assignLabels(LingoProcessingContext context,
org.apache.mahout.math.matrix.DoubleMatrix2D stemCos,
com.carrotsearch.hppc.IntIntOpenHashMap filteredRowToStemIndex,
org.apache.mahout.math.matrix.DoubleMatrix2D phraseCos)
ILabelAssignerLingoProcessingContext.clusterLabelFeatureIndex and
LingoProcessingContext.clusterLabelScore arrays.
assignLabels in interface ILabelAssignercontext - contains all information about the current clustering requeststemCos - base vector -- single stems cosine matrixfilteredRowToStemIndex - mapping between row indices of stemCos and indices of
stems in PreprocessingContext.allStemsphraseCos - base vector -- phrase cosine matrix
|
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 | ||||||||