Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "stats/base/dists/uniform/entropy/docs/types/index.d"

Index

Functions

Functions

entropy

  • entropy(a: number, b: number): number
  • Returns the differential entropy of a uniform distribution.

    Notes

    • If provided a >= b, the function returns NaN.

    Parameters

    • a: number

      minimum support

    • b: number

      maximum support

    Returns number

    differential entropy

    Example

    var v = entropy( 0.0, 1.0 );
    // returns 0.0

    Example

    var v = entropy( 4.0, 12.0 );
    // returns ~2.079

    Example

    var v = entropy( -4.0, 4.0 );
    // returns ~2.079

    Example

    var v = entropy( 1.0, -0.1 );
    // returns NaN

    Example

    var v = entropy( 2.0, NaN );
    // returns NaN

    Example

    var v = entropy( NaN, 2.0 );
    // returns NaN