Java Code Examples for org.datavec.api.records.Record#setRecord()

The following examples show how to use org.datavec.api.records.Record#setRecord() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransformProcessSequenceRecordReader.java    From DataVec with Apache License 2.0 5 votes vote down vote up
/**
 * Similar to {@link #next()}, but returns a {@link Record} object, that may include metadata such as the source
 * of the data
 *
 * @return next record
 */
@Override
public Record nextRecord() {
    Record next = sequenceRecordReader.nextRecord();
    next.setRecord(transformProcess.execute(next.getRecord()));
    return next;
}
 
Example 2
Source File: TransformProcessSequenceRecordReader.java    From DataVec with Apache License 2.0 5 votes vote down vote up
/**
 * Load multiple records from the given a list of {@link RecordMetaData} instances<br>
 *
 * @param recordMetaDatas Metadata for the records that we want to load from
 * @return Multiple records for the given RecordMetaData instances
 * @throws IOException If I/O error occurs during loading
 */
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> records = sequenceRecordReader.loadFromMetaData(recordMetaDatas);
    for (Record record : records)
        record.setRecord(transformProcess.execute(record.getRecord()));
    return records;
}
 
Example 3
Source File: RegexLineRecordReader.java    From DataVec with Apache License 2.0 5 votes vote down vote up
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> list = super.loadFromMetaData(recordMetaDatas);

    for (Record r : list) {
        String line = r.getRecord().get(0).toString();
        r.setRecord(parseLine(line));
    }

    return list;
}
 
Example 4
Source File: CSVRecordReader.java    From DataVec with Apache License 2.0 5 votes vote down vote up
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> list = super.loadFromMetaData(recordMetaDatas);

    for (Record r : list) {
        String line = r.getRecord().get(0).toString();
        r.setRecord(parseLine(line));
    }

    return list;
}
 
Example 5
Source File: TransformProcessSequenceRecordReader.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
/**
 * Similar to {@link #next()}, but returns a {@link Record} object, that may include metadata such as the source
 * of the data
 *
 * @return next record
 */
@Override
public Record nextRecord() {
    Record next = sequenceRecordReader.nextRecord();
    next.setRecord(transformProcess.execute(next.getRecord()));
    return next;
}
 
Example 6
Source File: TransformProcessSequenceRecordReader.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
/**
 * Load multiple records from the given a list of {@link RecordMetaData} instances<br>
 *
 * @param recordMetaDatas Metadata for the records that we want to load from
 * @return Multiple records for the given RecordMetaData instances
 * @throws IOException If I/O error occurs during loading
 */
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> records = sequenceRecordReader.loadFromMetaData(recordMetaDatas);
    for (Record record : records)
        record.setRecord(transformProcess.execute(record.getRecord()));
    return records;
}
 
Example 7
Source File: RegexLineRecordReader.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> list = super.loadFromMetaData(recordMetaDatas);

    for (Record r : list) {
        String line = r.getRecord().get(0).toString();
        r.setRecord(parseLine(line));
    }

    return list;
}
 
Example 8
Source File: CSVRecordReader.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
@Override
public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException {
    List<Record> list = super.loadFromMetaData(recordMetaDatas);

    for (Record r : list) {
        String line = r.getRecord().get(0).toString();
        r.setRecord(parseLine(line));
    }

    return list;
}
 
Example 9
Source File: TransformProcessSequenceRecordReader.java    From DataVec with Apache License 2.0 3 votes vote down vote up
/**
 * Load a single record from the given {@link RecordMetaData} instance<br>
 * Note: that for data that isn't splittable (i.e., text data that needs to be scanned/split), it is more efficient to
 * load multiple records at once using {@link #loadFromMetaData(List)}
 *
 * @param recordMetaData Metadata for the record that we want to load from
 * @return Single record for the given RecordMetaData instance
 * @throws IOException If I/O error occurs during loading
 */
@Override
public Record loadFromMetaData(RecordMetaData recordMetaData) throws IOException {
    Record load = sequenceRecordReader.loadFromMetaData(recordMetaData);
    load.setRecord(transformProcess.execute(load.getRecord()));
    return load;
}
 
Example 10
Source File: TransformProcessSequenceRecordReader.java    From deeplearning4j with Apache License 2.0 3 votes vote down vote up
/**
 * Load a single record from the given {@link RecordMetaData} instance<br>
 * Note: that for data that isn't splittable (i.e., text data that needs to be scanned/split), it is more efficient to
 * load multiple records at once using {@link #loadFromMetaData(List)}
 *
 * @param recordMetaData Metadata for the record that we want to load from
 * @return Single record for the given RecordMetaData instance
 * @throws IOException If I/O error occurs during loading
 */
@Override
public Record loadFromMetaData(RecordMetaData recordMetaData) throws IOException {
    Record load = sequenceRecordReader.loadFromMetaData(recordMetaData);
    load.setRecord(transformProcess.execute(load.getRecord()));
    return load;
}