use of hex.genmodel.easy.RowData in project h2o-3 by h2oai.
the class PredictCsv method formatDataRow.
private static RowData formatDataRow(String[] splitLine, String[] inputColumnNames) {
// Assemble the input values for the row.
RowData row = new RowData();
int maxI = Math.min(inputColumnNames.length, splitLine.length);
for (int i = 0; i < maxI; i++) {
String columnName = inputColumnNames[i];
String cellData = splitLine[i];
switch(cellData) {
case "":
case "NA":
case "N/A":
case "-":
continue;
default:
row.put(columnName, cellData);
}
}
return row;
}
use of hex.genmodel.easy.RowData in project h2o-3 by h2oai.
the class GenMunger method fillDefault.
public RowData fillDefault(String[] vals) {
RowData row = new RowData();
String[] types = inTypes();
String[] names = inNames();
for (int i = 0; i < types.length; ++i) row.put(names[i], vals == null ? null : valueOf(types[i], vals[i]));
return row;
}
Aggregations