time-to-botec

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

repl.txt (1096B)


      1 
      2 {{alias}}( [mx, my] )
      3     Returns an accumulator function which incrementally computes a sample
      4     Pearson product-moment correlation distance.
      5 
      6     The correlation distance is defined as one minus the Pearson product-moment
      7     correlation coefficient and, thus, resides on the interval [0,2].
      8 
      9     If provided values, the accumulator function returns an updated sample
     10     correlation distance. If not provided values, the accumulator function
     11     returns the current sample correlation distance.
     12 
     13     If provided `NaN` or a value which, when used in computations, results in
     14     `NaN`, the accumulated value is `NaN` for all future invocations.
     15 
     16     Parameters
     17     ----------
     18     mx: number (optional)
     19         Known mean.
     20 
     21     my: number (optional)
     22         Known mean.
     23 
     24     Returns
     25     -------
     26     acc: Function
     27         Accumulator function.
     28 
     29     Examples
     30     --------
     31     > var accumulator = {{alias}}();
     32     > var d = accumulator()
     33     null
     34     > d = accumulator( 2.0, 1.0 )
     35     1.0
     36     > d = accumulator( -5.0, 3.14 )
     37     ~2.0
     38     > d = accumulator()
     39     ~2.0
     40 
     41     See Also
     42     --------
     43