Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d
Class BubbleVisualizer<NV extends NumberVector<NV,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.Projection2DVisualizer<NV>
              extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.BubbleVisualizer<NV>
Type Parameters:
NV - Type of the DatabaseObject being visualized.
All Implemented Interfaces:
Parameterizable, ProjectedVisualizer, Visualizer

@Reference(authors="E. Achtert, H.-P. Kriegel, L. Reichert, E. Schubert, R. Wojdanowski, A. Zimek",
           title="Visual Evaluation of Outlier Detection Models",
           booktitle="Proceedings of the 15th International Conference on Database Systems for Advanced Applications (DASFAA), Tsukuba, Japan, 2010")
public class BubbleVisualizer<NV extends NumberVector<NV,?>>
extends Projection2DVisualizer<NV>

Generates a SVG-Element containing bubbles. A Bubble is a circle visualizing an outlierness-score, with its center at the position of the visualized object and its radius depending on the objects score.

Author:
Remigius Wojdanowski

Field Summary
private  AnnotationResult<? extends Number> anResult
          Contains the "outlierness-scores" to be displayed as Tooltips.
static String BUBBLE
          Generic tag to indicate the type of element.
private  Clustering<Model> clustering
          A clustering of the database.
private  boolean fill
          Fill parameter.
private  Flag FILL_FLAG
          Flag for half-transparent filling of bubbles.
static OptionID FILL_ID
          OptionID for FILL_FLAG.
private  double gamma
          Gamma parameter.
static OptionID GAMMA_ID
          OptionID for GAMMA_PARAM.
private  DoubleParameter GAMMA_PARAM
          Parameter for the gamma-correction.
private  GammaScaling gammaScaling
          Used for Gamma-Correction.
static String NAME
          A short name characterizing this Visualizer.
private  OutlierScoreMeta outlierMeta
          Used for normalizing coordinates.
private  ScalingFunction scaling
          Scaling function to use for Bubbles
static OptionID SCALING_ID
          OptionID for SCALING_PARAM
private  ObjectParameter<ScalingFunction> SCALING_PARAM
          Parameter for scaling functions Key: -bubble.scaling
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
context, metadata
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
LEVEL_BACKGROUND, LEVEL_FOREGROUND, LEVEL_INTERACTIVE, LEVEL_STATIC, META_LEVEL, META_NAME, META_NOTHUMB, META_VISIBLE, META_VISIBLE_DEFAULT
 
Constructor Summary
BubbleVisualizer(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
private  Double getScaledForId(int id)
          Convenience method to apply scalings in the right order.
 void init(String name, VisualizerContext context, OutlierResult result)
          Initializes this Visualizer.
private  void setupCSS(SVGPlot svgp)
          Registers the Bubble-CSS-Class at a SVGPlot.
 Element visualize(SVGPlot svgp, VisualizationProjection proj, double width, double height)
          Returns an Element representing a visualization.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.Projection2DVisualizer
setupCanvas
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
addRedrawListener, fireRedrawEvent, getMetadata, init, removeRedrawListener, requestRedraw, setLevel
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, 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.visualization.visualizers.Visualizer
addRedrawListener, getMetadata, removeRedrawListener
 

Field Detail

GAMMA_ID

public static final OptionID GAMMA_ID
OptionID for GAMMA_PARAM.


GAMMA_PARAM

private final DoubleParameter GAMMA_PARAM
Parameter for the gamma-correction.

Key: -bubble.gamma

Default value: 1.0 < /p>


gamma

private double gamma
Gamma parameter.


FILL_ID

public static final OptionID FILL_ID
OptionID for FILL_FLAG.


FILL_FLAG

private final Flag FILL_FLAG
Flag for half-transparent filling of bubbles.

Key: -bubble.fill


fill

private boolean fill
Fill parameter.


SCALING_ID

public static final OptionID SCALING_ID
OptionID for SCALING_PARAM


SCALING_PARAM

private final ObjectParameter<ScalingFunction> SCALING_PARAM
Parameter for scaling functions

Key: -bubble.scaling


scaling

private ScalingFunction scaling
Scaling function to use for Bubbles


outlierMeta

private OutlierScoreMeta outlierMeta
Used for normalizing coordinates.


gammaScaling

private GammaScaling gammaScaling
Used for Gamma-Correction. TODO: Make the gamma-function exchangeable (inc. Parameter etc.).


anResult

private AnnotationResult<? extends Number> anResult
Contains the "outlierness-scores" to be displayed as Tooltips. If this result does not contain all IDs the database contains, behavior is undefined.


clustering

private Clustering<Model> clustering
A clustering of the database.


BUBBLE

public static final String BUBBLE
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

NAME

public static final String NAME
A short name characterizing this Visualizer.

See Also:
Constant Field Values
Constructor Detail

BubbleVisualizer

public BubbleVisualizer(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

init

public void init(String name,
                 VisualizerContext context,
                 OutlierResult result)
Initializes this Visualizer.

Parameters:
name - Visualizer name
context - Visualization context
result - contains "outlierness-scores", corresponding to the database.

setupCSS

private void setupCSS(SVGPlot svgp)
Registers the Bubble-CSS-Class at a SVGPlot. This class depends on the FILL_FLAG.

Parameters:
svgp - the SVGPlot to register the Tooltip-CSS-Class.

getScaledForId

private Double getScaledForId(int id)
Convenience method to apply scalings in the right order.

Parameters:
id - object ID to get scaled score for
Returns:
a Double representing a outlierness-score, after it has modified by the given scales.

visualize

public Element visualize(SVGPlot svgp,
                         VisualizationProjection proj,
                         double width,
                         double height)
Description copied from interface: ProjectedVisualizer
Returns an Element representing a visualization.

Parameters:
svgp - plot to contain the returned Element.
proj - projection to use
width - Width of plot
height - Height of plot
Returns:
an Element representing a 2-dimensional visualization.

Release 0.3 (2010-03-31_1612)