Table Of Contents

density_kernel

Version:
    Last Modified: March 15, 2017

    Computes the probability density estimate of the input vector.

    Syntax

    d = density_kernel(x)
    d = density_kernel(x, xi)
    d = density_kernel(x, xi, 'pName', pValue)
    [d, xo] = density_kernel(x)
    [d, xo] = density_kernel(x, xi)
    [d, xo] = density_kernel(x, xi, 'pName', pValue)
    [d, xo, w] = density_kernel(x)
    [d, xo, w] = density_kernel(x, xi)
    [d, xo, w] = density_kernel(x, xi, 'pName', pValue)
    Legacy name: ksdensity

    Inputs

    x

    Real vector of sample points.

    xi

    Points where the probability density is estimated.

    pValue

    String depending on the setting of pName. If pName is 'kernel', pValue specifies the kernel window used in the density estimation process. pValue then accepts the following values: 'normal' (using the normal function as kernel window), 'box' (using the rectangle function as the kernel window), 'triangle' (using the triangle function as the kernel window), or 'epanechnikov' (using the epanechnikov function as the kernel window). If pName is 'npoints', pValue specifies the length of xi. The default is 100. If pName is 'width', pValue specifies the width of the kernel window.

    Default: 'normal'

    pName

    Name of the property name/value pairs that control the probability density estimation. You can use several property name/value pairs. pName is a string that accepts the following values:

    Name Description
    'kernel'

    Determines that pValue specifies the kernel window used in the density estimation process.

    'npoints'

    Determines that pValue specifies the length of xi.

    'width'

    Determines that pValue specifies the width of the kernel window.

    Outputs

    d

    Probability density values estimated at xo.

    xo

    Points where the probability density is estimated.

    w

    Width of the kernel window.

    Specifying multiple property name/property value pairs

    You can specify multiple pairs of property name/property value, for example density_kernel(x, xi, 'pName1', pValue1, 'pName2', pValue2)

    X = randnormal(1, 128);
    Y = density_kernel(X);

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices


    Recently Viewed Topics