org.knime.base.node.mine.mds
Class MDSManager

java.lang.Object
  extended by org.knime.base.node.mine.mds.MDSManager

public class MDSManager
extends Object

The MDSManager handling the MDS algorithmic. For each row of the given DataTable a DataPoint with the specified dimension is created, representing the higher dimensional row. The DataPoints are rearranged in a way that their distances to each other approximately match the distances of the corresponding high dimensional points. The rearrangement is an iterative process running as many epochs as specified. The learn rate, specifying the step size is reduced after each epoch, so that the process converges at the end.

Author:
Kilian Thiel, University of Konstanz

Field Summary
static double DEF_MINDIST_THRESHOLD
          The default value of the minimum distance threshold.
static int DEFAULT_SEED
          The default random seed.
static int MAX_SEED
          The maximum random seed.
static int MIN_SEED
          The minimum random seed.
 
Constructor Summary
MDSManager(int dimension, String distance, boolean fuzzy, BufferedDataTable inData, ExecutionContext exec)
          Creates a new instance of MDSManager with the given dimension, distance metric, fuzzy flag and in data to use.
 
Method Summary
 Hashtable<RowKey,DataPoint> getDataPoints()
           
 int getDimension()
           
 void init(long seed)
          Initializes the lower dimensional data points randomly.
 void reset()
          Clears the Hashtable containing the high and the corresponding low dimensional data points.
 void train(int epochs, double learningrate)
          Does the training by adjusting the lower dimensional data points accordant to their distances and the distances of the original data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SEED

public static final int DEFAULT_SEED
The default random seed.

See Also:
Constant Field Values

MIN_SEED

public static final int MIN_SEED
The minimum random seed.

See Also:
Constant Field Values

MAX_SEED

public static final int MAX_SEED
The maximum random seed.

See Also:
Constant Field Values

DEF_MINDIST_THRESHOLD

public static final double DEF_MINDIST_THRESHOLD
The default value of the minimum distance threshold.

See Also:
Constant Field Values
Constructor Detail

MDSManager

public MDSManager(int dimension,
                  String distance,
                  boolean fuzzy,
                  BufferedDataTable inData,
                  ExecutionContext exec)
           throws IllegalArgumentException
Creates a new instance of MDSManager with the given dimension, distance metric, fuzzy flag and in data to use. If the dimension is less or equals zero a IllegalArgumentException is thrown.

Parameters:
dimension - The output MDS dimension
distance - The distance metric to use.
fuzzy - true if the in data is fuzzy valued data.
inData - The in data to use.
exec - The ExecutionContext to monitor the progress.
Throws:
IllegalArgumentException - if the specified dimension is less or equals zero.
Method Detail

init

public void init(long seed)
          throws CanceledExecutionException
Initializes the lower dimensional data points randomly.

Parameters:
seed - The random seed to use.
Throws:
CanceledExecutionException - If execution was canceled by the user.

train

public void train(int epochs,
                  double learningrate)
           throws CanceledExecutionException
Does the training by adjusting the lower dimensional data points accordant to their distances and the distances of the original data.

Parameters:
epochs - The number of epochs to train.
learningrate - The learn rate, specifying the step size of adjustment.
Throws:
CanceledExecutionException - If execution was canceled by the user.

getDataPoints

public Hashtable<RowKey,DataPoint> getDataPoints()
Returns:
a Hashtable containing the RowKeys as as keys and the corresponding lower dimensional DataPoints as values.

reset

public void reset()
Clears the Hashtable containing the high and the corresponding low dimensional data points.


getDimension

public int getDimension()
Returns:
the dimension The dimension of the low dimensionl data points.


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.