Package org.apache.nemo.examples.beam
Class AlternatingLeastSquare.TrainingDataCombiner
- java.lang.Object
-
- org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
-
- org.apache.nemo.examples.beam.AlternatingLeastSquare.TrainingDataCombiner
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- AlternatingLeastSquare
public static final class AlternatingLeastSquare.TrainingDataCombiner extends org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
Combiner for the training data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TrainingDataCombiner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>
addInput(java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> accumulator, org.apache.beam.sdk.values.KV<int[],float[]> value)
java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>
createAccumulator()
org.apache.beam.sdk.values.KV<int[],float[]>
extractOutput(java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> accumulator)
java.lang.reflect.TypeVariable<?>
getAccumTVariable()
org.apache.beam.sdk.coders.Coder<AccumT>
getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1)
org.apache.beam.sdk.coders.Coder<OutputT>
getDefaultOutputCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1)
java.lang.String
getIncompatibleGlobalWindowErrorMessage()
java.lang.reflect.TypeVariable<?>
getInputTVariable()
java.lang.reflect.TypeVariable<?>
getOutputTVariable()
java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>
mergeAccumulators(java.lang.Iterable<java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>> accumulators)
void
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder arg0)
-
-
-
Method Detail
-
createAccumulator
public java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> createAccumulator()
- Specified by:
createAccumulator
in classorg.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
-
addInput
public java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> addInput(java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> accumulator, org.apache.beam.sdk.values.KV<int[],float[]> value)
- Specified by:
addInput
in classorg.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
-
mergeAccumulators
public java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> mergeAccumulators(java.lang.Iterable<java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>> accumulators)
- Specified by:
mergeAccumulators
in classorg.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
-
extractOutput
public org.apache.beam.sdk.values.KV<int[],float[]> extractOutput(java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>> accumulator)
- Specified by:
extractOutput
in classorg.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],float[]>,java.util.List<org.apache.beam.sdk.values.KV<int[],float[]>>,org.apache.beam.sdk.values.KV<int[],float[]>>
-
getAccumulatorCoder
public org.apache.beam.sdk.coders.Coder<AccumT> getAccumulatorCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1) throws org.apache.beam.sdk.coders.CannotProvideCoderException
- Specified by:
getAccumulatorCoder
in interfaceorg.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends java.lang.Object,AccumT extends java.lang.Object,OutputT extends java.lang.Object>
- Throws:
org.apache.beam.sdk.coders.CannotProvideCoderException
-
getDefaultOutputCoder
public org.apache.beam.sdk.coders.Coder<OutputT> getDefaultOutputCoder(org.apache.beam.sdk.coders.CoderRegistry arg0, org.apache.beam.sdk.coders.Coder<InputT> arg1) throws org.apache.beam.sdk.coders.CannotProvideCoderException
- Specified by:
getDefaultOutputCoder
in interfaceorg.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends java.lang.Object,AccumT extends java.lang.Object,OutputT extends java.lang.Object>
- Throws:
org.apache.beam.sdk.coders.CannotProvideCoderException
-
getIncompatibleGlobalWindowErrorMessage
public java.lang.String getIncompatibleGlobalWindowErrorMessage()
- Specified by:
getIncompatibleGlobalWindowErrorMessage
in interfaceorg.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends java.lang.Object,AccumT extends java.lang.Object,OutputT extends java.lang.Object>
-
getInputTVariable
public java.lang.reflect.TypeVariable<?> getInputTVariable()
-
getAccumTVariable
public java.lang.reflect.TypeVariable<?> getAccumTVariable()
-
getOutputTVariable
public java.lang.reflect.TypeVariable<?> getOutputTVariable()
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder arg0)
- Specified by:
populateDisplayData
in interfaceorg.apache.beam.sdk.transforms.display.HasDisplayData
-
-