public final class IDXDataSource<T extends Output<T>> extends Object implements ConfigurableDataSource<T>
Transparently reads GZipped files.
The file format is defined here.
Modifier and Type | Class and Description |
---|---|
static class |
IDXDataSource.IDXData
Java side representation for an IDX file.
|
static class |
IDXDataSource.IDXDataSourceProvenance
Provenance class for
IDXDataSource . |
static class |
IDXDataSource.IDXType
The possible IDX input formats.
|
Constructor and Description |
---|
IDXDataSource(Path featuresPath,
Path outputPath,
OutputFactory<T> outputFactory)
Constructs an IDXDataSource from the supplied paths.
|
Modifier and Type | Method and Description |
---|---|
IDXDataSource.IDXType |
getDataType()
The type of the features that were loaded in.
|
OutputFactory<T> |
getOutputFactory()
Returns the OutputFactory associated with this Output subclass.
|
DataSourceProvenance |
getProvenance() |
Iterator<Example<T>> |
iterator() |
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
int |
size()
The number of examples loaded.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public IDXDataSource(Path featuresPath, Path outputPath, OutputFactory<T> outputFactory) throws IOException
featuresPath
- The path to the features file.outputPath
- The path to the output file.outputFactory
- The output factory.IOException
- If either file cannot be read.public void postConfig() throws IOException
postConfig
in interface com.oracle.labs.mlrg.olcut.config.Configurable
IOException
public OutputFactory<T> getOutputFactory()
DataSource
getOutputFactory
in interface DataSource<T extends Output<T>>
public DataSourceProvenance getProvenance()
getProvenance
in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<DataSourceProvenance>
public int size()
public IDXDataSource.IDXType getDataType()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.