Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.preprocessing.HiSCPreprocessor<V>
All Implemented Interfaces:
Loggable, PreferenceVectorPreprocessor<V>, Preprocessor<V>, Parameterizable

public class HiSCPreprocessor<V extends RealVector<V,?>>
extends AbstractParameterizable
implements PreferenceVectorPreprocessor<V>

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

Author:
Elke Achtert

Field Summary
private  double alpha
          The maximum allowed variance along a coordinate axis.
static String ALPHA_D
          Description for parameter alpha.
static String ALPHA_P
          Option string for parameter alpha.
static double DEFAULT_ALPHA
          The default value for alpha.
private  Integer k
          The number of nearest neighbors considered to determine the preference vector.
static String K_D
          Description for parameter k.
static String K_P
          Option string for parameter k.
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
HiSCPreprocessor()
          Provides a new HiSCPreprocessor that computes the preference vector of objects of a certain database.
 
Method Summary
 String description()
          Returns a description of the class and the required parameters.
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 actual preprocessing step of this Preprocessor for the objects of the specified database.
 String[] setParameters(String[] args)
          Sets the attributes of the class accordingly to the given parameters.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, 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.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

DEFAULT_ALPHA

public static final double DEFAULT_ALPHA
The default value for alpha.

See Also:
Constant Field Values

ALPHA_P

public static final String ALPHA_P
Option string for parameter alpha.

See Also:
Constant Field Values

ALPHA_D

public static String ALPHA_D
Description for parameter alpha.


K_P

public static final String K_P
Option string for parameter k.

See Also:
Constant Field Values

K_D

public static final String K_D
Description for parameter k.

See Also:
Constant Field Values

alpha

private double alpha
The maximum allowed variance along a coordinate axis.


k

private Integer k
The number of nearest neighbors considered to determine the preference vector.

Constructor Detail

HiSCPreprocessor

public HiSCPreprocessor()
Provides a new HiSCPreprocessor that computes the preference vector of objects of a certain database.

Method Detail

run

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

Specified by:
run in interface Preprocessor<V extends RealVector<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
See Also:
Preprocessor.run(de.lmu.ifi.dbs.elki.database.Database, boolean, boolean)

description

public String description()
Description copied from interface: Parameterizable
Returns a description of the class and the required parameters.

This description should be suitable for a usage description as for a standalone application.

Specified by:
description in interface Parameterizable
Overrides:
description in class AbstractParameterizable
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Description copied from interface: Parameterizable
Sets the attributes of the class accordingly to the given parameters. Returns a new String array containing those entries of the given array that are neither expected nor used by this Parameterizable.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

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.1 (2008-07-10_1838)