SparseNumberVectorLabelParser
instead!@Title(value="Sparse Float Vector Label Parser") @Description(value="Parser for the following line format:\nA single line provides a single point. Entries are separated by whitespace. The values will be parsed as floats (resulting in a set of SparseFloatVectors). A line is expected in the following format: The first entry of each line is the number of attributes with coordinate value not zero. Subsequent entries are of the form (index, value), where index is the number of the corresponding dimension, and value is the value of the corresponding attribute.Any pair of two subsequent substrings not containing whitespace is tried to be read as int and float. If this fails for the first of the pair (interpreted ans index), it will be appended to a label. (Thus, any label must not be parseable as Integer.) If the float component is not parseable, an exception will be thrown. Empty lines and lines beginning with \"#\" will be ignored.") @Deprecated public class SparseFloatVectorLabelParser extends SparseNumberVectorLabelParser<SparseFloatVector>
Provides a parser for parsing one point per line, attributes separated by whitespace.
Several labels may be given per point. A label must not be parseable as double. Lines starting with "#" will be ignored.
A line is expected in the following format: The first entry of each line is
the number of attributes with coordinate value not zero. Subsequent entries
are of the form index value
each, where index is the number of
the corresponding dimension, and value is the value of the corresponding
attribute. A complet line then could look like this:
3 7 12.34 8 56.78 11 1.234 objectlabelwhere
3
indicates there are three attributes set,
7,8,11
are the attributes indexes and there is a non-numerical
object label.
An index can be specified to identify an entry to be treated as class label. This index counts all entries (numeric and labels as well) starting with 0.
Modifier and Type | Class and Description |
---|---|
static class |
SparseFloatVectorLabelParser.Parameterizer
Deprecated.
Parameterization class.
|
BundleStreamSource.Event
labels, values
attributes, columnnames, curlbl, curvec, factory, haslabels, labelcolumns, labelIndices, lineNumber, maxdim, meta, mindim, nextevent, unique
ATTRIBUTE_CONCATENATION, comment, COMMENT_PATTERN, DEFAULT_SEPARATOR, NUMBER_PATTERN, QUOTE_CHARS, tokenizer
Constructor and Description |
---|
SparseFloatVectorLabelParser(Pattern colSep,
String quoteChars,
Pattern comment,
BitSet labelIndices)
Deprecated.
Constructor.
|
getLogger, getTypeInformation, parseLineInternal
buildMeta, createDBObject, data, getMeta, initStream, nextEvent
parse
lengthWithoutLinefeed, toString