time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1154B)


      1 
      2 {{alias}}( W )
      3     Returns an accumulator function which incrementally computes a moving
      4     residual sum of squares (RSS).
      5 
      6     The `W` parameter defines the number of values over which to compute the
      7     moving residual sum of squares.
      8 
      9     If provided a value, the accumulator function returns an updated moving
     10     residual sum of squares. If not provided a value, the accumulator function
     11     returns the current moving residual sum of squares.
     12 
     13     As `W` values are needed to fill the window buffer, the first `W-1` returned
     14     values are calculated from smaller sample sizes. Until the window is full,
     15     each returned value is calculated from all provided values.
     16 
     17     Parameters
     18     ----------
     19     W: integer
     20         Window size.
     21 
     22     Returns
     23     -------
     24     acc: Function
     25         Accumulator function.
     26 
     27     Examples
     28     --------
     29     > var accumulator = {{alias}}( 3 );
     30     > var r = accumulator()
     31     null
     32     > r = accumulator( 2.0, 3.0 )
     33     1.0
     34     > r = accumulator( -5.0, 2.0 )
     35     50.0
     36     > r = accumulator( 3.0, 2.0 )
     37     51.0
     38     > r = accumulator( 5.0, -2.0 )
     39     99.0
     40     > r = accumulator()
     41     99.0
     42 
     43     See Also
     44     --------
     45