com.sun.labs.minion.clustering
Class AbstractClusterer
java.lang.Object
com.sun.labs.minion.clustering.AbstractClusterer
- All Implemented Interfaces:
- com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable
- Direct Known Subclasses:
- FieldClusterer, HAC, KMeans, MST
public abstract class AbstractClusterer
- extends java.lang.Object
- implements com.sun.labs.util.props.Configurable
An abstract base class for clustering algorithms.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
features
protected java.util.Map<java.lang.String,java.lang.Integer> features
ptof
protected java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> ptof
field
protected java.lang.String field
k
protected int k
N
protected int N
rs
protected ResultSetImpl rs
els
protected ClusterElement[] els
clusters
protected double[][] clusters
names
protected java.lang.String[] names
fc
protected FeatureClusterer fc
fs
protected FeatureSelector fs
nFeat
protected int nFeat
ignored
protected java.util.List<ClusterElement> ignored
empty
protected java.util.List<ClusterElement> empty
te
protected java.util.List<ClusterElement> te
one
protected static double[] one
logTag
public static final java.lang.String logTag
- See Also:
- Constant Field Values
dc
protected DocCache dc
PROP_K
@ConfigInteger(defaultValue=10)
public static final java.lang.String PROP_K
- See Also:
- Constant Field Values
AbstractClusterer
public AbstractClusterer()
init
public void init(java.lang.String field)
throws SearchEngineException
- Throws:
SearchEngineException
setResults
public void setResults(ResultSet r)
setFeatureInfo
public void setFeatureInfo(FeatureClusterer fc,
FeatureSelector fs,
int nFeat)
setK
public void setK(int k)
setData
public void setData(java.lang.String d)
getElements
protected void getElements(FeatureClusterer fc,
FeatureSelector fs,
int nFeat)
throws SearchEngineException
- Gets the elements that are to be clustered from a set of results. The first
step is to select the given number of feature clusters from the result set.
- Parameters:
fc
- a feature clustererfs
- a feature selectornFeat
- the number of features to select
- Throws:
SearchEngineException
getElements
protected void getElements()
throws SearchEngineException
- Throws:
SearchEngineException
getClusters
public java.util.Set<ResultsCluster> getClusters()
getEls
public ClusterElement[] getEls()
toString
public java.lang.String toString(double[] p)
cluster
public abstract void cluster()
newProperties
public void newProperties(com.sun.labs.util.props.PropertySheet ps)
throws com.sun.labs.util.props.PropertyException
- Specified by:
newProperties
in interface com.sun.labs.util.props.Configurable
- Throws:
com.sun.labs.util.props.PropertyException