Package elki.datasource.parser
Class NumberVectorLabelParser.Par<V extends NumberVector>
- java.lang.Object
-
- elki.datasource.parser.AbstractStreamingParser.Par
-
- elki.datasource.parser.NumberVectorLabelParser.Par<V>
-
- All Implemented Interfaces:
Parameterizer
- Direct Known Subclasses:
CategorialDataAsNumberVectorParser.Par,LibSVMFormatParser.Par,SparseNumberVectorLabelParser.Par,TermFrequencyParser.Par
- Enclosing class:
- NumberVectorLabelParser<V extends NumberVector>
public static class NumberVectorLabelParser.Par<V extends NumberVector> extends AbstractStreamingParser.Par
Parameterization class.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected NumberVector.Factory<V>factoryFactory object.static OptionIDLABEL_INDICES_IDA comma separated list of the indices of labels (may be numeric), counting whitespace separated entries in a line starting with 0.protected long[]labelIndicesKeeps the indices of the attributes to be treated as a string label.static OptionIDVECTOR_TYPE_IDParameter to specify the type of vectors to produce.-
Fields inherited from class elki.datasource.parser.AbstractStreamingParser.Par
format
-
-
Constructor Summary
Constructors Constructor Description Par()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Parameterization config)Configure the class.protected voidgetFactory(Parameterization config)Get the object factory.protected voidgetLabelIndices(Parameterization config)Get the label indices.NumberVectorLabelParser<V>make()Make an instance after successful configuration.
-
-
-
Field Detail
-
LABEL_INDICES_ID
public static final OptionID LABEL_INDICES_ID
A comma separated list of the indices of labels (may be numeric), counting whitespace separated entries in a line starting with 0. The corresponding entries will be treated as a label.
-
VECTOR_TYPE_ID
public static final OptionID VECTOR_TYPE_ID
Parameter to specify the type of vectors to produce.
-
labelIndices
protected long[] labelIndices
Keeps the indices of the attributes to be treated as a string label.
-
factory
protected NumberVector.Factory<V extends NumberVector> factory
Factory object.
-
-
Method Detail
-
configure
public void configure(Parameterization config)
Description copied from interface:ParameterizerConfigure the class.Note: the status is collected by the parameterization object, so that multiple errors may arise and be reported in one run.
- Specified by:
configurein interfaceParameterizer- Overrides:
configurein classAbstractStreamingParser.Par- Parameters:
config- Parameterization
-
getFactory
protected void getFactory(Parameterization config)
Get the object factory.- Parameters:
config- Parameterization
-
getLabelIndices
protected void getLabelIndices(Parameterization config)
Get the label indices.- Parameters:
config- Parameterization
-
make
public NumberVectorLabelParser<V> make()
Description copied from interface:ParameterizerMake an instance after successful configuration.Note: your class should return the exact type, only this very broad interface should use
Objectas return type.- Specified by:
makein interfaceParameterizer- Specified by:
makein classAbstractStreamingParser.Par- Returns:
- a new instance
-
-