Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/kde2d/docs/types/index.d"

Index

Interfaces

Functions

Functions

Export assignment kde2d

  • Computes two-dimensional kernel density estimates.

    throws

    must provide valid options

    Parameters

    • arr: ndarray

      two column ndarray with the first column containing the x values and the second column containing the y values

    • Optional options: Options

      function options

    Returns Output

    object containing the density estimates (z) along grid points (x and y values)

    Example

    var ndarray = require( `@stdlib/ndarray/ctor` );
    
    var x = [ 0.6333, 0.8643, 1.0952, 1.3262, 1.5571, 1.7881, 2.019, 2.25, 2.481, 2.7119 ];
    var y = [ -0.0468, 0.8012, 1.6492, 2.4973, 3.3454, 4.1934, 5.0415, 5.8896, 6.7376, 7.5857 ];
    
    var buffer = x.concat( y );
    var n = x.length;
    var shape = [ n, 2 ];
    var strides = [ 1, n ];
    var offset = 0;
    var order = 'column-major';
    
    var arr = ndarray( 'generic', buffer, shape, strides, offset, order );
    var out = kde2d( arr );
  • Computes two-dimensional kernel density estimates.

    throws

    first and second arguments must be of the same length

    throws

    must provide valid options

    Parameters

    Returns Output

    object containing the density estimates (z) along grid points (x and y values)

    Example

    var x = [ 0.6333, 0.8643, 1.0952, 1.3262, 1.5571, 1.7881, 2.019, 2.25, 2.481, 2.7119 ];
    var y = [ -0.0468, 0.8012, 1.6492, 2.4973, 3.3454, 4.1934, 5.0415, 5.8896, 6.7376, 7.5857 ];
    var out = kde2d( x, y );