Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/incr/mapcorr/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

accumulator

accumulator: (x?: undefined | number, y?: undefined | number) => number | null

If provided a value, the accumulator function returns an updated accumulated value. If not provided a value, the accumulator function returns the current accumulated value.

param

input value

param

input value

returns

sample absolute correlation coefficient or null

Type declaration

    • (x?: undefined | number, y?: undefined | number): number | null
    • Parameters

      • Optional x: undefined | number
      • Optional y: undefined | number

      Returns number | null

Functions

Export assignment incrmapcorr

  • Returns an accumulator function which incrementally computes a moving sample absolute Pearson product-moment correlation coefficient.

    Parameters

    • W: number

      window size

    • meanx: number

      mean value

    • meany: number

      mean value

    Returns accumulator

    accumulator function

    Example

    var accumulator = incrmapcorr( 3, -2.0, 10.0 );
  • Returns an accumulator function which incrementally computes a moving sample absolute Pearson product-moment correlation coefficient.

    Parameters

    • W: number

      window size

    Returns accumulator

    accumulator function

    Example

    var accumulator = incrmapcorr( 3 );
    
    var ar = accumulator();
    // returns null
    
    ar = accumulator( 2.0, 1.0 );
    // returns 0.0
    
    ar = accumulator( -5.0, 3.14 );
    // returns ~1.0
    
    ar = accumulator( 3.0, -1.0 );
    // returns ~0.925
    
    ar = accumulator( 5.0, -9.5 );
    // returns ~0.863
    
    ar = accumulator();
    // returns ~0.863