Class SVMLightRecordWriter
- java.lang.Object
-
- org.datavec.api.records.writer.impl.FileRecordWriter
-
- org.datavec.api.records.writer.impl.misc.SVMLightRecordWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable,RecordWriter
- Direct Known Subclasses:
LibSvmRecordWriter
public class SVMLightRecordWriter extends FileRecordWriter
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEATURE_FIRST_COLUMNstatic StringFEATURE_LAST_COLUMNprotected intfeatureFirstColumnprotected intfeatureLastColumnstatic StringHAS_LABELSprotected booleanhasLabelstatic StringLABEL_FIRST_COLUMNstatic StringLABEL_LAST_COLUMNprotected intlabelFirstColumnprotected intlabelLastColumnprotected booleanmultilabelstatic StringMULTILABELstatic StringNAME_SPACEstatic StringUNLABELEDstatic StringZERO_BASED_INDEXINGstatic StringZERO_BASED_LABEL_INDEXINGprotected booleanzeroBasedIndexingprotected booleanzeroBasedLabelIndexing-
Fields inherited from class org.datavec.api.records.writer.impl.FileRecordWriter
conf, DEFAULT_CHARSET, encoding, NEW_LINE, out, partitioner
-
Fields inherited from interface org.datavec.api.records.writer.RecordWriter
APPEND
-
-
Constructor Summary
Constructors Constructor Description SVMLightRecordWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetConf(Configuration conf)Set DataVec configurationbooleansupportsBatch()Returns true if this record writer supports efficient batch writing usingRecordWriter.writeBatch(List)PartitionMetaDatawrite(List<Writable> record)Write next record.PartitionMetaDatawriteBatch(List<List<Writable>> batch)Write a batch of records-
Methods inherited from class org.datavec.api.records.writer.impl.FileRecordWriter
close, getConf, initialize, initialize
-
-
-
-
Field Detail
-
NAME_SPACE
public static final String NAME_SPACE
-
FEATURE_FIRST_COLUMN
public static final String FEATURE_FIRST_COLUMN
-
FEATURE_LAST_COLUMN
public static final String FEATURE_LAST_COLUMN
-
ZERO_BASED_INDEXING
public static final String ZERO_BASED_INDEXING
-
ZERO_BASED_LABEL_INDEXING
public static final String ZERO_BASED_LABEL_INDEXING
-
HAS_LABELS
public static final String HAS_LABELS
-
MULTILABEL
public static final String MULTILABEL
-
LABEL_FIRST_COLUMN
public static final String LABEL_FIRST_COLUMN
-
LABEL_LAST_COLUMN
public static final String LABEL_LAST_COLUMN
-
UNLABELED
public static final String UNLABELED
- See Also:
- Constant Field Values
-
featureFirstColumn
protected int featureFirstColumn
-
featureLastColumn
protected int featureLastColumn
-
zeroBasedIndexing
protected boolean zeroBasedIndexing
-
zeroBasedLabelIndexing
protected boolean zeroBasedLabelIndexing
-
hasLabel
protected boolean hasLabel
-
multilabel
protected boolean multilabel
-
labelFirstColumn
protected int labelFirstColumn
-
labelLastColumn
protected int labelLastColumn
-
-
Method Detail
-
setConf
public void setConf(Configuration conf)
Set DataVec configuration- Specified by:
setConfin interfaceConfigurable- Overrides:
setConfin classFileRecordWriter- Parameters:
conf-
-
supportsBatch
public boolean supportsBatch()
Description copied from interface:RecordWriterReturns true if this record writer supports efficient batch writing usingRecordWriter.writeBatch(List)- Returns:
-
write
public PartitionMetaData write(List<Writable> record) throws IOException
Write next record.- Parameters:
record-- Throws:
IOException
-
writeBatch
public PartitionMetaData writeBatch(List<List<Writable>> batch) throws IOException
Description copied from interface:RecordWriterWrite a batch of records- Parameters:
batch- the batch to write- Throws:
IOException
-
-