public class BasicKMean extends AbstractClustering
Basic KMeans clustering
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
protected ClusterModel |
distMetric |
protected boolean |
initialized |
protected int |
maxIteration |
clusterNum, clusterSet, featureFilter, indexReader, randomSeed, showProgress| Constructor and Description |
|---|
BasicKMean(IndexReader indexReader,
ClusterModel distMetric,
DocClusterSet initClusterSet) |
BasicKMean(IndexReader indexReader,
ClusterModel distMetric,
int clusterNum) |
BasicKMean(IndexReader indexReader,
ClusterModel distMetric,
int clusterNum,
boolean initAllObjs) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cluster(IRDoc[] arrDoc)
Cluster given testing documents to the given number of clusters
|
int |
getMaxIteration() |
boolean |
getUseAllObjectForInitialization() |
protected boolean |
initialize(IRDoc[] arrDoc) |
void |
setMaxIteration(int iteration) |
void |
setUseAllObjectForInitialization(boolean option)
If this option is true, the algorithm randomly assign all objects to the given number of clusters during initialization.
|
cluster, getCluster, getClusterNum, getClusterSet, getFeatureFilter, getIndexReader, getRandomSeed, setFeatureFilter, setRandomSeed, setShowProgressprotected ClusterModel distMetric
protected boolean initialized
protected int maxIteration
public BasicKMean(IndexReader indexReader, ClusterModel distMetric, int clusterNum)
public BasicKMean(IndexReader indexReader, ClusterModel distMetric, int clusterNum, boolean initAllObjs)
public BasicKMean(IndexReader indexReader, ClusterModel distMetric, DocClusterSet initClusterSet)
public void setUseAllObjectForInitialization(boolean option)
option - whether use all objects for initializationpublic boolean getUseAllObjectForInitialization()
protected boolean initialize(IRDoc[] arrDoc)
public boolean cluster(IRDoc[] arrDoc)
ClusteringarrDoc - the document set for clusteringpublic int getMaxIteration()
public void setMaxIteration(int iteration)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.