de.lmu.ifi.dbs.elki.parser.meta
Class RandomProjectionParser<V extends RealVector<V,?>>
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.parser.meta.MetaParser<V>
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
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 interface de.lmu.ifi.dbs.elki.parser.Parser |
parse |
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.
RandomProjectionParser
protected RandomProjectionParser()
- Adds the parameter
NUMBER_SELECTED_ATTRIBUTES_PARAM
.
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)