de.lmu.ifi.dbs.elki.evaluation.similaritymatrix
Class ComputeSimilarityMatrixImage<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.evaluation.similaritymatrix.ComputeSimilarityMatrixImage<O>
Type Parameters:
O - Object class
All Implemented Interfaces:
Evaluator, ResultProcessor

public class ComputeSimilarityMatrixImage<O>
extends Object
implements Evaluator

Compute a similarity matrix for a distance function.


Nested Class Summary
static class ComputeSimilarityMatrixImage.Parameterizer<O>
          Parameterization class.
static class ComputeSimilarityMatrixImage.SimilarityMatrix
          Similarity matrix image.
 
Field Summary
private  DistanceFunction<? super O,? extends NumberDistance<?,?>> distanceFunction
          The distance function to use
(package private) static Logging logger
          The logger.
private  ScalingFunction scaling
          Scaling function to use
static OptionID SCALING_ID
          OptionID for the scaling function to use
private  boolean skipzero
          Skip zero values.
static OptionID SKIPZERO_ID
          OptionID to skip zero values when plotting to increase contrast.
 
Constructor Summary
ComputeSimilarityMatrixImage(DistanceFunction<? super O,? extends NumberDistance<?,?>> distanceFunction, ScalingFunction scaling, boolean skipzero)
          Constructor.
 
Method Summary
private  ComputeSimilarityMatrixImage.SimilarityMatrix computeSimilarityMatrixImage(Relation<O> relation, Iterator<DBID> iter)
          Compute the actual similarity image.
private  Iterator<DBID> getDBIDIterator(IterableResult<?> ir)
          Wrap the uncheckable cast with the manual check.
 void processNewResult(HierarchicalResult baseResult, Result result)
          Process a result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static final Logging logger
The logger.


SCALING_ID

public static final OptionID SCALING_ID
OptionID for the scaling function to use


SKIPZERO_ID

public static final OptionID SKIPZERO_ID
OptionID to skip zero values when plotting to increase contrast.


distanceFunction

private DistanceFunction<? super O,? extends NumberDistance<?,?>> distanceFunction
The distance function to use


scaling

private ScalingFunction scaling
Scaling function to use


skipzero

private boolean skipzero
Skip zero values.

Constructor Detail

ComputeSimilarityMatrixImage

public ComputeSimilarityMatrixImage(DistanceFunction<? super O,? extends NumberDistance<?,?>> distanceFunction,
                                    ScalingFunction scaling,
                                    boolean skipzero)
Constructor.

Parameters:
distanceFunction - Distance function to use
scaling - Scaling function to use for contrast
skipzero - Skip zero values when scaling.
Method Detail

computeSimilarityMatrixImage

private ComputeSimilarityMatrixImage.SimilarityMatrix computeSimilarityMatrixImage(Relation<O> relation,
                                                                                   Iterator<DBID> iter)
Compute the actual similarity image.

Parameters:
relation - Relation
iter - DBID iterator
Returns:
result object

getDBIDIterator

private Iterator<DBID> getDBIDIterator(IterableResult<?> ir)
Wrap the uncheckable cast with the manual check.

Parameters:
ir - Interable result
Returns:
Iterator if Integer iterable, null otherwise.

processNewResult

public void processNewResult(HierarchicalResult baseResult,
                             Result result)
Description copied from interface: ResultProcessor
Process a result.

Specified by:
processNewResult in interface ResultProcessor
Parameters:
baseResult - The base of the result tree.
result - Newly added result subtree.

Release 0.4.0 (2011-09-20_1324)