Class AlternatingLeastSquare.TrainingDataCombiner

  • All Implemented Interfaces:
    Serializable, org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<org.apache.beam.sdk.values.KV<int[],​float[]>,​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[]>,​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 Detail

      • TrainingDataCombiner

        public TrainingDataCombiner()
    • Method Detail

      • createAccumulator

        public List<org.apache.beam.sdk.values.KV<int[],​float[]>> createAccumulator()
        Specified by:
        createAccumulator in class org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],​float[]>,​List<org.apache.beam.sdk.values.KV<int[],​float[]>>,​org.apache.beam.sdk.values.KV<int[],​float[]>>
      • addInput

        public List<org.apache.beam.sdk.values.KV<int[],​float[]>> addInput​(List<org.apache.beam.sdk.values.KV<int[],​float[]>> accumulator,
                                                                                 org.apache.beam.sdk.values.KV<int[],​float[]> value)
        Specified by:
        addInput in class org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],​float[]>,​List<org.apache.beam.sdk.values.KV<int[],​float[]>>,​org.apache.beam.sdk.values.KV<int[],​float[]>>
      • mergeAccumulators

        public List<org.apache.beam.sdk.values.KV<int[],​float[]>> mergeAccumulators​(Iterable<List<org.apache.beam.sdk.values.KV<int[],​float[]>>> accumulators)
        Specified by:
        mergeAccumulators in class org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],​float[]>,​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​(List<org.apache.beam.sdk.values.KV<int[],​float[]>> accumulator)
        Specified by:
        extractOutput in class org.apache.beam.sdk.transforms.Combine.CombineFn<org.apache.beam.sdk.values.KV<int[],​float[]>,​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 interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends Object,​AccumT extends Object,​OutputT extends 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 interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends Object,​AccumT extends Object,​OutputT extends Object>
        Throws:
        org.apache.beam.sdk.coders.CannotProvideCoderException
      • getIncompatibleGlobalWindowErrorMessage

        public String getIncompatibleGlobalWindowErrorMessage()
        Specified by:
        getIncompatibleGlobalWindowErrorMessage in interface org.apache.beam.sdk.transforms.CombineFnBase.GlobalCombineFn<InputT extends Object,​AccumT extends Object,​OutputT extends Object>
      • getInputTVariable

        public TypeVariable<?> getInputTVariable()
      • getAccumTVariable

        public TypeVariable<?> getAccumTVariable()
      • getOutputTVariable

        public TypeVariable<?> getOutputTVariable()
      • populateDisplayData

        public void populateDisplayData​(org.apache.beam.sdk.transforms.display.DisplayData.Builder arg0)
        Specified by:
        populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayData