Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.parser.meta
Class RandomProjectionParser<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.parser.meta.MetaParser<V>
              extended by de.lmu.ifi.dbs.elki.parser.meta.RandomProjectionParser<V>
Type Parameters:
V - the type of RealVector contained in both the ParsingResult of the base parser and the projected ParsingResult of this ProjectionParser
All Implemented Interfaces:
Parser<V>, Parameterizable
Direct Known Subclasses:
DoubleVectorRandomProjectionParser, SparseFloatVectorRandomProjectionParser

public abstract class RandomProjectionParser<V extends RealVector<V,?>>
extends MetaParser<V>

A RandomProjectionParser selects a subset of attributes randomly for projection of a ParsingResult.

The cardinality of the subset of attributes is specified as a parameter.

Author:
Arthur Zimek

Field Summary
protected  int k
          Holds the desired cardinality of the subset of attributes selected for projection.
static OptionID NUMBER_SELECTED_ATTRIBUTES_ID
          ID for the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.
private  IntParameter NUMBER_SELECTED_ATTRIBUTES_PARAM
          Parameter for the desired cardinality of the subset of attributes selected for projection.
protected  Random random
          Holds a random object.
 
Fields inherited from class de.lmu.ifi.dbs.elki.parser.meta.MetaParser
BASEPARSER_ID
 
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, logger
 
Constructor Summary
protected RandomProjectionParser()
          Adds the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.
 
Method Summary
 List<String> setParameters(List<String> args)
          Calls the super method and sets additionally the value of the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.
 
Methods inherited from class de.lmu.ifi.dbs.elki.parser.meta.MetaParser
retrieveBaseParsingresult, toString
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription
 
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, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.parser.Parser
parse
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription
 

Field Detail

k

protected int k
Holds the desired cardinality of the subset of attributes selected for projection.


NUMBER_SELECTED_ATTRIBUTES_ID

public static final OptionID NUMBER_SELECTED_ATTRIBUTES_ID
ID for the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.


NUMBER_SELECTED_ATTRIBUTES_PARAM

private final IntParameter NUMBER_SELECTED_ATTRIBUTES_PARAM
Parameter for the desired cardinality of the subset of attributes selected for projection.

Key: -randomprojection.numberselected

Default: 1

Constraint: ≥1


random

protected final Random random
Holds a random object.

Constructor Detail

RandomProjectionParser

protected RandomProjectionParser()
Adds the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.

Method Detail

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Calls the super method and sets additionally the value of the parameter NUMBER_SELECTED_ATTRIBUTES_PARAM.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class MetaParser<V extends RealVector<V,?>>
Parameters:
args - parameters to set the attributes accordingly to
Returns:
a list containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting
See Also:
AbstractParameterizable.setParameters(java.util.List)

Release 0.2 (2009-07-06_1820)