|
|
|||||||||||||||||||||
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.DiSH<V>
V
- the type of Realvector handled by this Algorithmpublic class DiSH<V extends RealVector<V,?>>
Algorithm for detecting subspace hierarchies.
Field Summary | |
---|---|
private double |
epsilon
Holds the value of epsilon parameter. |
private DoubleParameter |
EPSILON_PARAM
Parameter that specifies the maximum radius of the neighborhood to be considered in each dimension for determination of the preference vector, must be a double equal to or greater than 0. |
private IntParameter |
MU_PARAM
Parameter that specifies the a minimum number of points as a smoothing factor to avoid the single-link-effect, must be an integer greater than 0. |
private OPTICS<V,PreferenceVectorBasedCorrelationDistance> |
optics
The optics algorithm to determine the cluster order. |
private Result<V> |
result
Holds the result; |
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 | |
---|---|
DiSH()
Provides a new algorithm for detecting supspace hierarchies. |
Method Summary | |
---|---|
private void |
buildHierarchy(Database<V> database,
DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction,
List<HierarchicalAxesParallelCorrelationCluster> clusters,
int dimensionality)
Builds the cluster hierarchy |
private void |
checkClusters(Database<V> database,
DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction,
Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap)
Removes the clusters with size < minpts from the cluster map and adds them to their parents. |
private void |
computeClusters(Database<V> database,
ClusterOrder<V,PreferenceVectorBasedCorrelationDistance> clusterOrder)
Computes the hierarchical clusters according to the cluster order. |
private Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> |
extractClusters(Database<V> database,
DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction,
ClusterOrder<V,PreferenceVectorBasedCorrelationDistance> clusterOrder)
Extracts the clusters from the cluster order. |
private HierarchicalAxesParallelCorrelationCluster |
findParent(Database<V> database,
DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction,
HierarchicalAxesParallelCorrelationCluster child,
Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap)
Returns the parent of the specified cluster |
List<AttributeSettings> |
getAttributeSettings()
Returns the settings of all options assigned to the option handler. |
Description |
getDescription()
Returns a description of the algorithm. |
Result<V> |
getResult()
Returns the result of the algorithm. |
private boolean |
isParent(Database<V> database,
DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction,
HierarchicalAxesParallelCorrelationCluster parent,
List<HierarchicalAxesParallelCorrelationCluster> children)
Returns true, if the specified parent cluster is a parent of one child of the children clusters. |
protected void |
runInTime(Database<V> database)
The run method encapsulated in measure of runtime. |
String[] |
setParameters(String[] args)
Grabs all specified options from the option handler and sets the values for the flags AbstractAlgorithm.VERBOSE_FLAG and AbstractAlgorithm.TIME_FLAG . |
private List<HierarchicalAxesParallelCorrelationCluster> |
sortClusters(Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap,
int dimensionality)
Sets the levels and indices in the clusters and returns a sorted list of the clusters. |
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, 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.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, getParameters, getPossibleOptions, inlineDescription |
Field Detail |
---|
private final DoubleParameter EPSILON_PARAM
Default value: 0.001
Key: -dish.epsilon
private final IntParameter MU_PARAM
Default value: 1
Key: -dish.mu
private OPTICS<V extends RealVector<V,?>,PreferenceVectorBasedCorrelationDistance> optics
private Result<V extends RealVector<V,?>> result
private double epsilon
Constructor Detail |
---|
public DiSH()
Method Detail |
---|
protected void runInTime(Database<V> database) throws IllegalStateException
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).public Result<V> getResult()
public Description getDescription()
Algorithm
Algorithm.getDescription()
public String[] setParameters(String[] args) throws ParameterException
AbstractAlgorithm
AbstractAlgorithm.VERBOSE_FLAG
and AbstractAlgorithm.TIME_FLAG
.
Any extending class should
call this method first and return the returned array without further
changes, but after setting further required parameters. An example for
overwritting this method taking advantage from the previously (in
superclasses) defined options would be:
{ String[] remainingParameters = super.setParameters(args); // set parameters for your class // for example like this: if(isSet(MY_PARAM_VALUE_PARAM)) { myParamValue = getParameterValue(MY_PARAM_VALUE_PARAM); } . . . return remainingParameters; // or in case of attributes requesting parameters themselves // return parameterizableAttribbute.setParameters(remainingParameters); }
setParameters
in interface Parameterizable
setParameters
in class AbstractAlgorithm<V extends RealVector<V,?>>
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingAbstractAlgorithm.setParameters(String[])
public List<AttributeSettings> getAttributeSettings()
AbstractParameterizable
getAttributeSettings
in interface Parameterizable
getAttributeSettings
in class AbstractParameterizable
Parameterizable.getAttributeSettings()
private void computeClusters(Database<V> database, ClusterOrder<V,PreferenceVectorBasedCorrelationDistance> clusterOrder)
database
- the database holding the objectsclusterOrder
- the cluster orderprivate Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> extractClusters(Database<V> database, DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction, ClusterOrder<V,PreferenceVectorBasedCorrelationDistance> clusterOrder)
database
- the database storing the objectsdistanceFunction
- the distance functionclusterOrder
- the cluster order to extract the clusters from
private List<HierarchicalAxesParallelCorrelationCluster> sortClusters(Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap, int dimensionality)
clustersMap
- the mapping of bits sets to clustersdimensionality
- the dimensionality of the data
private void checkClusters(Database<V> database, DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction, Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap)
database
- the database storing the objectsdistanceFunction
- the distance functionclustersMap
- the map containing the clustersprivate HierarchicalAxesParallelCorrelationCluster findParent(Database<V> database, DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction, HierarchicalAxesParallelCorrelationCluster child, Map<BitSet,List<HierarchicalAxesParallelCorrelationCluster>> clustersMap)
database
- the database storing the objectsdistanceFunction
- the distance functionchild
- the child to search teh parent forclustersMap
- the map containing the clusters
private void buildHierarchy(Database<V> database, DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction, List<HierarchicalAxesParallelCorrelationCluster> clusters, int dimensionality)
distanceFunction
- the distance functionclusters
- the sorted list of clustersdimensionality
- the dimensionality of the datadatabase
- the fatabase containing the data objectsprivate boolean isParent(Database<V> database, DiSHDistanceFunction<V,DiSHPreprocessor<V,?>> distanceFunction, HierarchicalAxesParallelCorrelationCluster parent, List<HierarchicalAxesParallelCorrelationCluster> children)
database
- the database containing the objectsdistanceFunction
- the distance function for distance computation between the clustersparent
- the parent to be testedchildren
- the list of children to be tested
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |