Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering.subspace
Class ProjectedClustering<V extends RealVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<V>
              extended by de.lmu.ifi.dbs.elki.algorithm.clustering.subspace.ProjectedClustering<V>
Type Parameters:
V - the type of Realvector handled by this Algorithm
All Implemented Interfaces:
Algorithm<V>, Clustering<V>, Loggable, Parameterizable
Direct Known Subclasses:
ORCLUS, PROCLUS

public abstract class ProjectedClustering<V extends RealVector<V,?>>
extends AbstractAlgorithm<V>
implements Clustering<V>

Abstract superclass for PROCLUS and ORCLUS.

Author:
Elke Achtert

Field Summary
private  EuklideanDistanceFunction<V> distanceFunction
          The euklidean distance function.
private  int k
          Number of clusters.
private  int k_i
          Multiplier for initial number of seeds.
static OptionID K_I_ID
          OptionID for K_I_PARAM
private  IntParameter K_I_PARAM
          Parameter to specify the multiplier for the initial number of seeds, must be an integer greater than 0.
static OptionID K_ID
          OptionID for K_PARAM
private  IntParameter K_PARAM
          Parameter to specify the number of clusters to find, must be an integer greater than 0.
private  int l
          Dimensionality of the clusters.
static OptionID L_ID
          OptionID for L_PARAM
private  IntParameter L_PARAM
          Parameter to specify the dimensionality of the clusters to find, must be an integer greater than 0.
private  Clusters<V> result
          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
ProjectedClustering()
          Sets the parameter k and l the optionhandler additionally to the parameters provided by super-classes.
 
Method Summary
protected  EuklideanDistanceFunction<V> getDistanceFunction()
          Returns the distance function.
protected  int getK_i()
          Returns the value of parameter k_i.
protected  int getK()
          Returns the value of parameter k.
protected  int getL()
          Returns the value of parameter l.
 Clusters<V> getResult()
          Returns the result of the algorithm.
 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.
protected  void setResult(Clusters<V> result)
          Sets the result of this algorithm.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
description, isTime, isVerbose, run, runInTime, 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
getDescription, run, setTime, setVerbose
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, description, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

K_ID

public static final OptionID K_ID
OptionID for K_PARAM


K_I_ID

public static final OptionID K_I_ID
OptionID for K_I_PARAM


L_ID

public static final OptionID L_ID
OptionID for L_PARAM


K_PARAM

private final IntParameter K_PARAM
Parameter to specify the number of clusters to find, must be an integer greater than 0.

Key: -projectedclustering.k


K_I_PARAM

private final IntParameter K_I_PARAM
Parameter to specify the multiplier for the initial number of seeds, must be an integer greater than 0.

Default value: 30

Key: -projectedclustering.k_i


L_PARAM

private final IntParameter L_PARAM
Parameter to specify the dimensionality of the clusters to find, must be an integer greater than 0.

Key: -projectedclustering.l


k

private int k
Number of clusters.


k_i

private int k_i
Multiplier for initial number of seeds.


l

private int l
Dimensionality of the clusters.


distanceFunction

private EuklideanDistanceFunction<V extends RealVector<V,?>> distanceFunction
The euklidean distance function.


result

private Clusters<V extends RealVector<V,?>> result
The result.

Constructor Detail

ProjectedClustering

public ProjectedClustering()
Sets the parameter k and l the optionhandler additionally to the parameters provided by super-classes.

Method Detail

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Description copied from class: AbstractAlgorithm
Grabs all specified options from the option handler and sets the values for the flags 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);
 }
 

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

getResult

public Clusters<V> getResult()
Description copied from interface: Algorithm
Returns the result of the algorithm.

Specified by:
getResult in interface Algorithm<V extends RealVector<V,?>>
Specified by:
getResult in interface Clustering<V extends RealVector<V,?>>
Returns:
the result of the algorithm
See Also:
Clustering.getResult()

getDistanceFunction

protected EuklideanDistanceFunction<V> getDistanceFunction()
Returns the distance function.

Returns:
the distance function

getK

protected int getK()
Returns the value of parameter k.

Returns:
the number of clusters to be found

getK_i

protected int getK_i()
Returns the value of parameter k_i.

Returns:
the initial number of clusters

getL

protected int getL()
Returns the value of parameter l.

Returns:
the average dimesnionality of the clusters to be found

setResult

protected void setResult(Clusters<V> result)
Sets the result of this algorithm.

Parameters:
result - the result to be set

Release 0.1 (2008-07-10_1838)