Class ReplaceNaNWithRandomFilter

  • All Implemented Interfaces:
    BundleStreamSource, ObjectFilter, StreamFilter

    public class ReplaceNaNWithRandomFilter
    extends AbstractStreamFilter
    A filter to replace all NaN values with random values.

    Note: currently, only dense vector columns are supported.

    TODO: add support for sparse vectors.

    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        Class logger
      • dist

        private Distribution dist
        Distribution to generate replacement values with.
      • rows

        private java.util.ArrayList<java.lang.Object> rows
        Row cache.
      • rnd

        private java.util.Random rnd
        Random generator.
    • Constructor Detail

      • ReplaceNaNWithRandomFilter

        public ReplaceNaNWithRandomFilter​(Distribution dist,
                                          RandomFactory rnd)
        Constructor.
        Parameters:
        dist - Distribution to draw from
        rnd - Random generator