Class SlidingSizeWindowAccessStrategy

    • Constructor Detail

      • SlidingSizeWindowAccessStrategy

        public SlidingSizeWindowAccessStrategy​(int windowSize,
                                               int slidingStep)
        Constructor. You need to specify the number of rows in each sliding size window (except for the last window) and the sliding step to the next window.

        Example

        Original data points (time, s1, s2):

        • (1, 100, null )
        • (2, 100, null )
        • (3, 100, null )
        • (4, 100, 'error')
        • (5, 100, null )
        • (6, 101, 'error')
        • (7, 102, 'error')
        Set windowSize to 2 and set slidingStep to 3, windows will be generated as below: Window 0: [(1, 100, null ), (2, 100, null)] Window 1: [(4, 100, 'error'), (5, 100, null)] Window 2: [(7, 102, 'error')]
        Parameters:
        windowSize - the number of rows in each sliding size window (0 < windowSize)
        slidingStep - the number of rows between the first point of the next window and the first point of the current window (0 < slidingStep)
      • SlidingSizeWindowAccessStrategy

        public SlidingSizeWindowAccessStrategy​(int windowSize)
        Constructor. You need to specify the number of rows in each sliding size window (except for the last window). The sliding step will be set to the same as the window size.
        Parameters:
        windowSize - the number of rows in each sliding size window (0 < windowSize)