Class EncoderMVImpute

    • Constructor Detail

      • EncoderMVImpute

        public EncoderMVImpute​(org.apache.wink.json4j.JSONObject parsedSpec,
                               String[] colnames,
                               int clen,
                               int minCol,
                               int maxCol)
                        throws org.apache.wink.json4j.JSONException
        Throws:
        org.apache.wink.json4j.JSONException
      • EncoderMVImpute

        public EncoderMVImpute()
    • Method Detail

      • getReplacements

        public String[] getReplacements()
      • getNonMVCount

        public long getNonMVCount​(int colID)
      • getReplacement

        public String getReplacement​(int colID)
      • build

        public void build​(FrameBlock in)
        Description copied from class: LegacyEncoder
        Build the transform meta data for the given block input. This call modifies and keeps meta data as encoder state.
        Specified by:
        build in class LegacyEncoder
        Parameters:
        in - input frame block
      • apply

        public MatrixBlock apply​(FrameBlock in,
                                 MatrixBlock out)
        Description copied from class: LegacyEncoder
        Encode input data blockwise according to existing transform meta data (transform apply).
        Specified by:
        apply in class LegacyEncoder
        Parameters:
        in - input frame block
        out - output matrix block
        Returns:
        output matrix block
      • subRangeEncoder

        public LegacyEncoder subRangeEncoder​(IndexRange ixRange)
        Description copied from class: LegacyEncoder
        Returns a new Encoder that only handles a sub range of columns.
        Overrides:
        subRangeEncoder in class LegacyEncoder
        Parameters:
        ixRange - the range (1-based, begin inclusive, end exclusive)
        Returns:
        an encoder of the same type, just for the sub-range
      • mergeAt

        public void mergeAt​(LegacyEncoder other,
                            int row,
                            int col)
        Description copied from class: LegacyEncoder
        Merges another encoder, of a compatible type, in after a certain position. Resizes as necessary. Encoders are compatible with themselves and EncoderComposite is compatible with every other Encoder.
        Overrides:
        mergeAt in class LegacyEncoder
        Parameters:
        other - the encoder that should be merged in
        row - the row where it should be placed (1-based)
        col - the col where it should be placed (1-based)
      • initMetaData

        public void initMetaData​(FrameBlock meta)
        Description copied from class: LegacyEncoder
        Sets up the required meta data for a subsequent call to apply.
        Specified by:
        initMetaData in class LegacyEncoder
        Parameters:
        meta - frame block
      • initRecodeIDList

        public void initRecodeIDList​(List<Integer> rcList)
      • getHistogram

        public HashMap<String,​Long> getHistogram​(int colID)
        Exposes the internal histogram after build.
        Parameters:
        colID - column ID
        Returns:
        histogram (map of string keys and long values)