time-to-botec

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

repl.txt (1211B)


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