Class 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
    • 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)  
      • Methods inherited from class org.apache.beam.sdk.transforms.Combine.CombineFn

        apply, compact, defaultValue, getInputType, getOutputType
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TrainingDataCombiner

        public TrainingDataCombiner()
    • Method Detail

      • createAccumulator

        public java.util.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[]>,​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 class 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[]>>
      • 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 class 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[]>>
      • 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 class 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[]>>
      • 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 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 interface org.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 interface org.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 interface org.apache.beam.sdk.transforms.display.HasDisplayData