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>
factory
Factory object.static 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.protected long[]
labelIndices
Keeps the indices of the attributes to be treated as a string label.static OptionID
VECTOR_TYPE_ID
Parameter 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 void
configure(Parameterization config)
Configure the class.protected void
getFactory(Parameterization config)
Get the object factory.protected void
getLabelIndices(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:Parameterizer
Configure 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:
configure
in interfaceParameterizer
- Overrides:
configure
in 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:Parameterizer
Make an instance after successful configuration.Note: your class should return the exact type, only this very broad interface should use
Object
as return type.- Specified by:
make
in interfaceParameterizer
- Specified by:
make
in classAbstractStreamingParser.Par
- Returns:
- a new instance
-
-