time-to-botec

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

repl.txt (1360B)


      1 
      2 {{alias}}( W[, mx, my] )
      3     Returns an accumulator function which incrementally computes a moving
      4     sample absolute Pearson product-moment correlation coefficient.
      5 
      6     The `W` parameter defines the number of values over which to compute the
      7     moving sample absolute correlation coefficient.
      8 
      9     If provided values, the accumulator function returns an updated moving
     10     sample absolute correlation coefficient. If not provided values, the
     11     accumulator function returns the current moving sample absolute correlation
     12     coefficient.
     13 
     14     As `W` (x,y) 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     mx: number (optional)
     24         Known mean.
     25 
     26     my: number (optional)
     27         Known mean.
     28 
     29     Returns
     30     -------
     31     acc: Function
     32         Accumulator function.
     33 
     34     Examples
     35     --------
     36     > var accumulator = {{alias}}( 3 );
     37     > var ar = accumulator()
     38     null
     39     > ar = accumulator( 2.0, 1.0 )
     40     0.0
     41     > ar = accumulator( -5.0, 3.14 )
     42     ~1.0
     43     > ar = accumulator( 3.0, -1.0 )
     44     ~0.925
     45     > ar = accumulator( 5.0, -9.5 )
     46     ~0.863
     47     > ar = accumulator()
     48     ~0.863
     49 
     50     See Also
     51     --------
     52