public class TextKMeans extends Object
| Constructor and Description |
|---|
TextKMeans() |
| Modifier and Type | Method and Description |
|---|---|
static HashMap<String,List<String>> |
cluster(HashMap<String,HashMap<String,Double>> tfidf,
Integer clustersNum,
StartStrategy strategy)
This clusters a map data structure of pairs bagName wordBag which is used as tfidf throughout
of JMotif.
|
static HashMap<String,Double> |
computeCentroid(HashMap<String,HashMap<String,Double>> tfidf,
List<String> members)
This computes centroid for a set of vectors.
|
public static HashMap<String,List<String>> cluster(HashMap<String,HashMap<String,Double>> tfidf, Integer clustersNum, StartStrategy strategy)
tfidf - the data to cluster.clustersNum - desired clusters number.strategy - The clustering strategy.Copyright © 2021. All rights reserved.