two column ndarray with the first column containing the x
values and the second column containing the y
values
function options
object containing the density estimates (z
) along grid points (x
and y
values)
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.
array of x values
array of y values
function options
object containing the density estimates (z
) along grid points (x
and y
values)
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 );
Computes two-dimensional kernel density estimates.
must provide valid options