public abstract class ColumnarDataSource<T extends Output<T>> extends Object implements ConfigurableDataSource<T>
ConfigurableDataSource
base class which takes columnar data (e.g., csv or DB table rows) and generates Example
s.Modifier and Type | Field and Description |
---|---|
protected boolean |
outputRequired |
protected RowProcessor<T> |
rowProcessor |
Modifier | Constructor and Description |
---|---|
protected |
ColumnarDataSource()
For OLCUT.
|
protected |
ColumnarDataSource(OutputFactory<T> outputFactory,
RowProcessor<T> rowProcessor,
boolean outputRequired)
Constructs a columnar data source with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
Map<String,Class<?>> |
getMetadataTypes()
Returns the metadata keys and value types that are created
by this DataSource.
|
OutputFactory<T> |
getOutputFactory()
Returns the OutputFactory associated with this Output subclass.
|
Iterator<Example<T>> |
iterator() |
protected abstract ColumnarIterator |
rowIterator()
The iterator that emits
ColumnarIterator.Row objects from the
underlying data source. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
@Config(mandatory=true, description="The row processor to use.") protected RowProcessor<T extends Output<T>> rowProcessor
@Config(description="Is an output required from each row?") protected boolean outputRequired
protected ColumnarDataSource()
protected ColumnarDataSource(OutputFactory<T> outputFactory, RowProcessor<T> rowProcessor, boolean outputRequired)
outputFactory
- The output factory.rowProcessor
- The row processor which converts rows into examples.outputRequired
- Is an output required for each example.public Map<String,Class<?>> getMetadataTypes()
public OutputFactory<T> getOutputFactory()
DataSource
getOutputFactory
in interface DataSource<T extends Output<T>>
protected abstract ColumnarIterator rowIterator()
ColumnarIterator.Row
objects from the
underlying data source.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.