Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

entropy

  • entropy(alpha: number, beta: number): number
  • Returns the differential entropy of a gamma distribution.

    Notes

    • If alpha <= 0 or beta <= 0, the function returns NaN.

    Parameters

    • alpha: number

      shape parameter

    • beta: number

      rate parameter

    Returns number

    entropy

    Example

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

    Example

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

    Example

    var v = entropy( 8.0, 2.0 );
    // returns ~1.723

    Example

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

    Example

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

    Example

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

    Example

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