Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.scaling.outlier
Class TopKOutlierScaling

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.scaling.outlier.TopKOutlierScaling
All Implemented Interfaces:
Parameterizable, OutlierScalingFunction, ScalingFunction

public class TopKOutlierScaling
extends Object
implements OutlierScalingFunction

Outlier scaling function that only keeps the top k outliers.

Author:
Erich Schubert

Field Summary
private  boolean binary
          Do a binary decision
private  Flag BINARY_FLAG
          Parameter to specify the lambda value Key: -topk.binary
static OptionID BINARY_ID
          OptionID for BINARY_FLAG
private  double cutoff
          The value we cut off at.
private  double ground
          The "ground" value
private  int k
          Number of outliers to keep.
static OptionID K_ID
          OptionID for K_PARAM
private  IntParameter K_PARAM
          Parameter to specify the number of outliers to keep Key: -topk.k
private  double max
          The maximum value
 
Constructor Summary
TopKOutlierScaling(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 double getMax()
          Get maximum resulting value.
 double getMin()
          Get minimum resulting value.
 double getScaled(double value)
          Transform a given value using the scaling function.
 void prepare(Database<?> db, Result result, OutlierResult or)
          Prepare is called once for each data set, before getScaled() will be called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K_ID

public static final OptionID K_ID
OptionID for K_PARAM


K_PARAM

private final IntParameter K_PARAM
Parameter to specify the number of outliers to keep

Key: -topk.k


k

private int k
Number of outliers to keep.


BINARY_ID

public static final OptionID BINARY_ID
OptionID for BINARY_FLAG


BINARY_FLAG

private final Flag BINARY_FLAG
Parameter to specify the lambda value

Key: -topk.binary


binary

private boolean binary
Do a binary decision


cutoff

private double cutoff
The value we cut off at.


ground

private double ground
The "ground" value


max

private double max
The maximum value

Constructor Detail

TopKOutlierScaling

public TopKOutlierScaling(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

prepare

public void prepare(Database<?> db,
                    Result result,
                    OutlierResult or)
Description copied from interface: OutlierScalingFunction
Prepare is called once for each data set, before getScaled() will be called. This function can be used to extract global parameters such as means, minimums or maximums from the Database, Result or Annotation.

Specified by:
prepare in interface OutlierScalingFunction
Parameters:
db - Database used
result - Result object
or - Outlier result to use

getMax

public double getMax()
Description copied from interface: ScalingFunction
Get maximum resulting value. May be Double.NaN or Double.POSITIVE_INFINITY.

Specified by:
getMax in interface ScalingFunction
Returns:
Maximum resulting value.

getMin

public double getMin()
Description copied from interface: ScalingFunction
Get minimum resulting value. May be Double.NaN or Double.NEGATIVE_INFINITY.

Specified by:
getMin in interface ScalingFunction
Returns:
Minimum resulting value.

getScaled

public double getScaled(double value)
Description copied from interface: ScalingFunction
Transform a given value using the scaling function.

Specified by:
getScaled in interface ScalingFunction
Parameters:
value - Original value
Returns:
Scaled value

Release 0.3 (2010-03-31_1612)