Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

entropy

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

    Notes

    • If the condition a <= c <= b is not satisfied, the function returns NaN.

    Parameters

    • a: number

      minimum support

    • b: number

      maximum support

    • c: number

      mode

    Returns number

    entropy

    Example

    var v = entropy( 0.0, 1.0, 0.5 );
    // returns ~-0.193

    Example

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

    Example

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

    Example

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

    Example

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

    Example

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

    Example

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

    Example

    var v = entropy( 0.0, 4.0, NaN );
    // returns NaN