public class SampleBatchIntDataSource extends Object implements DataSource<int[]>
| Constructor and Description |
|---|
SampleBatchIntDataSource(List<SampleBatch> batches)
Construct with batches
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
getData(int row)
Get the data for a given row
|
void |
getData(int startRow,
int stopRow,
int[][] output)
Get data between given rows.
|
void |
getRandomRows(int[][] output) |
Iterator<int[]> |
iterator() |
int |
numDimensions() |
int |
numRows() |
void |
setSeed(long seed)
Set the random seed
|
public SampleBatchIntDataSource(List<SampleBatch> batches) throws IOException
batches - IOExceptionpublic void setSeed(long seed)
seed - public void getData(int startRow, int stopRow, int[][] output)
DataSourceDataSource.numRows().
data is guaranteed to have (stopRow - startRow) valid entriesgetData in interface DataSource<int[]>startRow - where to start (inclusive)stopRow - where to stop (exclusive)output - the array to fillpublic void getRandomRows(int[][] output)
getRandomRows in interface DataSource<int[]>output - a random set of data. This array is guaranteed to be filled.public int numDimensions()
numDimensions in interface DataSource<int[]>public int numRows()
numRows in interface DataSource<int[]>public int[] getData(int row)
DataSourcegetData in interface DataSource<int[]>row - the row number