Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.preprocessing
Class HiSCPreprocessor<V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.preprocessing.HiSCPreprocessor<V>
Type Parameters:
V - the type of NumberVector handled by the preprocessor
All Implemented Interfaces:
PreferenceVectorPreprocessor<V>, Preprocessor<V>, Parameterizable

@Title(value="HiSC Preprocessor")
@Description(value="Computes the preference vector of objects of a certain database according to the HiSC algorithm.")
public class HiSCPreprocessor<V extends NumberVector<V,?>>
extends AbstractLoggable
implements PreferenceVectorPreprocessor<V>, Parameterizable

Preprocessor for HiSC preference vector assignment to objects of a certain database.

Author:
Elke Achtert
See Also:
HiSC

Field Summary
private  double alpha
          Holds the value of parameter ALPHA_PARAM.
static OptionID ALPHA_ID
          OptionID for ALPHA_PARAM
private  DoubleParameter ALPHA_PARAM
          The maximum absolute variance along a coordinate axis.
static double DEFAULT_ALPHA
          The default value for alpha.
private  Integer k
          Holds the value of parameter K_PARAM.
static OptionID K_ID
          OptionID for K_PARAM.
private  IntParameter K_PARAM
          The number of nearest neighbors considered to determine the preference vector.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
HiSCPreprocessor(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
private  BitSet determinePreferenceVector(Database<V> database, Integer id, List<Integer> neighborIDs, StringBuffer msg)
          Determines the preference vector according to the specified neighbor ids.
 double getAlpha()
          Returns the value of the alpha parameter (i.e. the maximum allowed variance along a coordinate axis).
 int getK()
          Returns the value of the k parameter (i.e. the number of nearest neighbors considered to determine the preference vector).
 void run(Database<V> database, boolean verbose, boolean time)
          This method executes the particular preprocessing step of this Preprocessor for the objects of the specified database.
 
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
 

Field Detail

DEFAULT_ALPHA

public static final double DEFAULT_ALPHA
The default value for alpha.

See Also:
Constant Field Values

ALPHA_ID

public static final OptionID ALPHA_ID
OptionID for ALPHA_PARAM


ALPHA_PARAM

private final DoubleParameter ALPHA_PARAM
The maximum absolute variance along a coordinate axis. Must be in the range of [0.0, 1.0).

Default value: DEFAULT_ALPHA

Key: -hisc.alpha


alpha

private double alpha
Holds the value of parameter ALPHA_PARAM.


K_ID

public static final OptionID K_ID
OptionID for K_PARAM.


K_PARAM

private final IntParameter K_PARAM
The number of nearest neighbors considered to determine the preference vector. If this value is not defined, k is set to three times of the dimensionality of the database objects.

Key: -hisc.k

Default value: three times of the dimensionality of the database objects


k

private Integer k
Holds the value of parameter K_PARAM.

Constructor Detail

HiSCPreprocessor

public HiSCPreprocessor(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

run

public void run(Database<V> database,
                boolean verbose,
                boolean time)
Description copied from interface: Preprocessor
This method executes the particular preprocessing step of this Preprocessor for the objects of the specified database.

Specified by:
run in interface Preprocessor<V extends NumberVector<V,?>>
Parameters:
database - the database for which the preprocessing is performed
verbose - flag to allow verbose messages while performing the algorithm
time - flag to request output of performance time

getAlpha

public double getAlpha()
Returns the value of the alpha parameter (i.e. the maximum allowed variance along a coordinate axis).

Returns:
the value of the alpha parameter

getK

public int getK()
Returns the value of the k parameter (i.e. the number of nearest neighbors considered to determine the preference vector).

Returns:
the value of the k parameter

determinePreferenceVector

private BitSet determinePreferenceVector(Database<V> database,
                                         Integer id,
                                         List<Integer> neighborIDs,
                                         StringBuffer msg)
Determines the preference vector according to the specified neighbor ids.

Parameters:
database - the database storing the objects
id - the id of the object for which the preference vector should be determined
neighborIDs - the ids of the neighbors
msg - a string buffer for debug messages
Returns:
the preference vector

Release 0.3 (2010-03-31_1612)