Package org.datavec.api.transform.reduce
Class Reducer
- java.lang.Object
-
- org.datavec.api.transform.reduce.Reducer
-
- All Implemented Interfaces:
Serializable
,IAssociativeReducer
public class Reducer extends Object implements IAssociativeReducer
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Reducer.Builder
static class
Reducer.ConditionalReduction
-
Constructor Summary
Constructors Constructor Description Reducer(List<String> keyColumns, ReduceOp defaultOp, Map<String,List<ReduceOp>> opMap, Map<String,AggregableColumnReduction> customReductions, Map<String,Reducer.ConditionalReduction> conditionalReductions, Set<String> ignoreInvalidInColumns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAggregableReduceOp<List<Writable>,List<Writable>>
aggregableReducer()
An aggregation that has the property that reduce(List(reduce(List(l1, l2)), l3)) = reduce(List(l1, reduce(List(l2, l3)))Schema
getInputSchema()
List<String>
getKeyColumns()
void
setInputSchema(Schema schema)
String
toString()
Schema
transform(Schema schema)
Get the output schema, given the input schema
-
-
-
Method Detail
-
setInputSchema
public void setInputSchema(Schema schema)
- Specified by:
setInputSchema
in interfaceIAssociativeReducer
-
getInputSchema
public Schema getInputSchema()
- Specified by:
getInputSchema
in interfaceIAssociativeReducer
- Returns:
-
getKeyColumns
public List<String> getKeyColumns()
- Specified by:
getKeyColumns
in interfaceIAssociativeReducer
- Returns:
-
transform
public Schema transform(Schema schema)
Get the output schema, given the input schema- Specified by:
transform
in interfaceIAssociativeReducer
- Returns:
-
aggregableReducer
public IAggregableReduceOp<List<Writable>,List<Writable>> aggregableReducer()
Description copied from interface:IAssociativeReducer
An aggregation that has the property that reduce(List(reduce(List(l1, l2)), l3)) = reduce(List(l1, reduce(List(l2, l3)))- Specified by:
aggregableReducer
in interfaceIAssociativeReducer
- Returns:
-
-