|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.AbstractLoggable de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<V> de.lmu.ifi.dbs.elki.algorithm.clustering.subspace.ProjectedClustering<V> de.lmu.ifi.dbs.elki.algorithm.clustering.subspace.PROCLUS<V>
V
- the type of Realvector handled by this Algorithmpublic class PROCLUS<V extends RealVector<V,?>>
PROCLUS provides the PROCLUS algorithm.
Nested Class Summary | |
---|---|
private class |
PROCLUS.Cluster
Encapsulates the attributes of a cluster. |
Field Summary | |
---|---|
private int |
m_i
Holds m_i. |
private IntParameter |
M_I_PARAM
Parameter to specify the the multiplier for the initial number of medoids, must be an integer greater than 0. |
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.clustering.subspace.ProjectedClustering |
---|
K_I_ID, K_ID, L_ID |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug |
Constructor Summary | |
---|---|
PROCLUS()
Adds the parameter M_I_PARAM to the option handler additionally to the
parameters provided by super-classes. |
Method Summary | |
---|---|
private Map<Integer,PROCLUS.Cluster> |
assignPoints(Map<Integer,Set<Integer>> dimensions,
Database<V> database)
Assigns the objects to the clusters. |
private double |
avgDistance(V centroid,
Set<Integer> objectIDs,
Database<V> database,
int dimension)
Computes the average distance of the objects to the centroid along the specified dimension. |
private Set<Integer> |
computeBadMedoids(Map<Integer,PROCLUS.Cluster> clusters,
int threshold)
Computes the bad medoids, where the medoid of a cluster with less than the specified threshold of objkects is bad. |
private Set<Integer> |
computeM_current(Set<Integer> m,
Set<Integer> m_best,
Set<Integer> m_bad)
|
private double |
evaluateClusters(Map<Integer,PROCLUS.Cluster> clusters,
Map<Integer,Set<Integer>> dimensions,
Database<V> database)
Evaluates the quality of the clusters. |
private Map<Integer,Set<Integer>> |
findDimensions(Set<Integer> medoids,
Database<V> database)
Determines the set of correlated dimensions for each medoid in the specified medoid set. |
Description |
getDescription()
Returns a description of the algorithm. |
private Map<Integer,List<QueryResult<DoubleDistance>>> |
getLocalities(Set<Integer> m_c,
Database<V> database)
|
private Set<Integer> |
greedy(Set<Integer> sampleSet,
int m)
Returns a piercing set of k medoids from the specified sample set. |
private Set<Integer> |
initialSet(Set<Integer> sampleSet,
int k)
Returns a set of k elements from the specified sample set. |
private double |
manhattanSegmentalDistance(V o1,
V o2,
Set<Integer> dimensions)
Returns the Manhattan segmental distance between o1 and o2 realtive to the specified dimensions. |
protected void |
runInTime(Database<V> database)
The run method encapsulated in measure of runtime. |
String[] |
setParameters(String[] args)
Sets the parameters k and l additionally to the parameters set by the super-class' method. |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.clustering.subspace.ProjectedClustering |
---|
getDistanceFunction, getK_i, getK, getL, getResult, setResult |
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm |
---|
description, isTime, isVerbose, run, setTime, setVerbose |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.Algorithm |
---|
run, setTime, setVerbose |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, description, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription |
Field Detail |
---|
private final IntParameter M_I_PARAM
Default value: 10
Key: -proclus.mi
private int m_i
Constructor Detail |
---|
public PROCLUS()
M_I_PARAM
to the option handler additionally to the
parameters provided by super-classes.
Method Detail |
---|
protected void runInTime(Database<V> database) throws IllegalStateException
AbstractAlgorithm
runInTime
in class AbstractAlgorithm<V extends RealVector<V,?>>
database
- the database to run the algorithm on
IllegalStateException
- if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).AbstractAlgorithm.runInTime(de.lmu.ifi.dbs.elki.database.Database)
public Description getDescription()
Algorithm
Algorithm.getDescription()
public String[] setParameters(String[] args) throws ParameterException
setParameters
in interface Parameterizable
setParameters
in class ProjectedClustering<V extends RealVector<V,?>>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingParameterizable.setParameters(String[])
private Set<Integer> greedy(Set<Integer> sampleSet, int m)
sampleSet
- the sample setm
- the number of medoids to be returned
private Set<Integer> initialSet(Set<Integer> sampleSet, int k)
sampleSet
- the sample setk
- the number of samples to be returned
private Set<Integer> computeM_current(Set<Integer> m, Set<Integer> m_best, Set<Integer> m_bad)
private Map<Integer,List<QueryResult<DoubleDistance>>> getLocalities(Set<Integer> m_c, Database<V> database)
private Map<Integer,Set<Integer>> findDimensions(Set<Integer> medoids, Database<V> database)
medoids
- the set of medoidsdatabase
- the database containing the objects
private Map<Integer,PROCLUS.Cluster> assignPoints(Map<Integer,Set<Integer>> dimensions, Database<V> database)
dimensions
- set of correlated dimensions for each medoid of the clusterdatabase
- the database containing the objects
private double manhattanSegmentalDistance(V o1, V o2, Set<Integer> dimensions)
o1
- the first objecto2
- the second objectdimensions
- the dimensions to be considered
private double evaluateClusters(Map<Integer,PROCLUS.Cluster> clusters, Map<Integer,Set<Integer>> dimensions, Database<V> database)
clusters
- the clusters to be evaluateddimensions
- the dimensions associated with each clusterdatabase
- the database holding the objects
private double avgDistance(V centroid, Set<Integer> objectIDs, Database<V> database, int dimension)
centroid
- the centroidobjectIDs
- the set of objects idsdatabase
- the database holding the objectsdimension
- the dimension for which the average distance is computed
private Set<Integer> computeBadMedoids(Map<Integer,PROCLUS.Cluster> clusters, int threshold)
clusters
- the clustersthreshold
- the threshold
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |