Package org.datavec.api.transform.reduce
Interface ColumnReduction
-
- All Superinterfaces:
ColumnOp
,Operation<Schema,Schema>
,Serializable
public interface ColumnReduction extends Serializable, ColumnOp
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnMetaData
getColumnOutputMetaData(String newColumnName, ColumnMetaData columnInputMeta)
Post-reduce: what is the metadata (type, etc) for this column? For example: a "count unique" operation on a String (StringMetaData) column would return an Integer (IntegerMetaData) columnString
getColumnOutputName(String columnInputName)
Post-reduce: what is the name of the column? For example, "myColumn" -> "mean(myColumn)"Writable
reduceColumn(List<Writable> columnData)
Reduce a single column.-
Methods inherited from interface org.datavec.api.transform.ColumnOp
columnName, columnNames, getInputSchema, outputColumnName, outputColumnNames, setInputSchema
-
-
-
-
Method Detail
-
reduceColumn
Writable reduceColumn(List<Writable> columnData)
Reduce a single column. Note: TheList<Writable>
here is a single column in a reduction window, and NOT the single row (as is usually the case forList<Writable>
instances- Parameters:
columnData
- The Writable objects for a column- Returns:
- Writable containing the reduced data
-
getColumnOutputName
String getColumnOutputName(String columnInputName)
Post-reduce: what is the name of the column? For example, "myColumn" -> "mean(myColumn)"- Parameters:
columnInputName
- Name of the column before reduction- Returns:
- Name of the column after the reduction
-
getColumnOutputMetaData
ColumnMetaData getColumnOutputMetaData(String newColumnName, ColumnMetaData columnInputMeta)
Post-reduce: what is the metadata (type, etc) for this column? For example: a "count unique" operation on a String (StringMetaData) column would return an Integer (IntegerMetaData) column- Parameters:
columnInputMeta
- Metadata for the column, before reduce- Returns:
- Metadata for the column, after the reduction
-
-