Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.result.clustering
Class SubspaceClusterMap

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.result.clustering.SubspaceClusterMap

public class SubspaceClusterMap
extends Object

Encapsulates a mapping of subspace dimensionalities to a list of set of ids forming a cluster in a specific subspace dimension.

Author:
Elke Achtert

Field Summary
private  Map<Integer,List<Set<Integer>>> clusters
          The map holding the clusters.
private  Map<Integer,List<LinearEquationSystem>> dependencies
          The map holding the basis vectors of the clusters.
private  int noiseDimensionality
          The dimensionality of noise.
 
Constructor Summary
SubspaceClusterMap(int noiseDimensionality)
          Provides a mapping of subspace dimensionalities to a list of set of ids forming a cluster in a specific subspace dimension.
 
Method Summary
 void add(Integer dimensionality, Set<Integer> ids, Database<ParameterizationFunction> database)
          Adds a cluster with the specified subspace dimensionality and the specified ids to this map.
 void addToNoise(Set<Integer> ids)
          Adds the specified ids to noise.
private  Database<RealVector> buildDerivatorDB(Database<ParameterizationFunction> database, Set<Integer> ids)
          Builds a database for the derivator consisting of the ids in the specified interval.
 List<Set<Integer>> getCluster(Integer subspaceDimension)
          Returns the list of clusters to which this map maps the specified subspaceDimension.
 List<LinearEquationSystem> getDependencies(Integer subspaceDimension)
          Returns the list of dependencies to which this map maps the specified subspaceDimension.
 int numClusters()
          Returns the number of clusters (excl. noise) in this map.
private  LinearEquationSystem runDerivator(Database<ParameterizationFunction> database, int dimensionality, Set<Integer> ids)
          Runs the derivator on the specified inerval and assigns all points having a distance less then the standard deviation of the derivator model to the model to this model.
 List<Integer> subspaceDimensionalities()
          Returns a sorted list view of the subspace dimensionalities contained in this cluster map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clusters

private Map<Integer,List<Set<Integer>>> clusters
The map holding the clusters.


dependencies

private Map<Integer,List<LinearEquationSystem>> dependencies
The map holding the basis vectors of the clusters.


noiseDimensionality

private int noiseDimensionality
The dimensionality of noise.

Constructor Detail

SubspaceClusterMap

public SubspaceClusterMap(int noiseDimensionality)
Provides a mapping of subspace dimensionalities to a list of set of ids forming a cluster in a specific subspace dimension.

Parameters:
noiseDimensionality - the dimensionality of noise
Method Detail

add

public void add(Integer dimensionality,
                Set<Integer> ids,
                Database<ParameterizationFunction> database)
Adds a cluster with the specified subspace dimensionality and the specified ids to this map.

Parameters:
dimensionality - the subspace dimensionality of the cluster
ids - the ids forming the cluster
database - the database holding the objects

addToNoise

public void addToNoise(Set<Integer> ids)
Adds the specified ids to noise.

Parameters:
ids - the ids forming the noise

subspaceDimensionalities

public List<Integer> subspaceDimensionalities()
Returns a sorted list view of the subspace dimensionalities contained in this cluster map.

Returns:
a sorted list view of the subspace dimensionalities contained in this map

getCluster

public List<Set<Integer>> getCluster(Integer subspaceDimension)
Returns the list of clusters to which this map maps the specified subspaceDimension.

Parameters:
subspaceDimension - subspace dimension whose associated clusters are to be returned
Returns:
the list of clusters to which this map maps the specified subspaceDimension

getDependencies

public List<LinearEquationSystem> getDependencies(Integer subspaceDimension)
Returns the list of dependencies to which this map maps the specified subspaceDimension.

Parameters:
subspaceDimension - subspace dimension whose associated dependencies are to be returned
Returns:
the list of dependencies to which this map maps the specified subspaceDimension

numClusters

public int numClusters()
Returns the number of clusters (excl. noise) in this map.

Returns:
the number of clusters (excl. noise) in this map

runDerivator

private LinearEquationSystem runDerivator(Database<ParameterizationFunction> database,
                                          int dimensionality,
                                          Set<Integer> ids)
Runs the derivator on the specified inerval and assigns all points having a distance less then the standard deviation of the derivator model to the model to this model.

Parameters:
database - the database containing the parametrization functions
ids - the ids to build the model
dimensionality - the dimensionality of the subspace
Returns:
a basis of the found subspace

buildDerivatorDB

private Database<RealVector> buildDerivatorDB(Database<ParameterizationFunction> database,
                                              Set<Integer> ids)
                                       throws UnableToComplyException
Builds a database for the derivator consisting of the ids in the specified interval.

Parameters:
database - the database storing the paramterization functions
ids - the ids to build the database from
Returns:
a database for the derivator consisting of the ids in the specified interval
Throws:
UnableToComplyException - if initialization of the database is not possible

Release 0.1 (2008-07-10_1838)