Documentation of 'jdistlib.Wishart' Java class
Wishart
jdistlib

Class Wishart



  • public class Wishart
    extends java.lang.Object
    Wishart distribution By: Roby Joehanes
    • Constructor Summary

      Constructors 
      Constructor and Description
      Wishart() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double[][] random(double n, double[][] L, RandomEngine rand)
      Sample Wishart distribution with n degree of freedom and LL' scale parameter.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Wishart

        public Wishart()
    • Method Detail

      • random

        public static final double[][] random(double n,
                                              double[][] L,
                                              RandomEngine rand)

        Sample Wishart distribution with n degree of freedom and LL' scale parameter. Wishart distribution is multivariate generalization of Gamma distribution. Remember that Gamma distribution is a generalization of both Chi-square and exponential distribution.

        I use L instead of the usual V to denote the scale parameter. Note that V = LL'. Compute L using Cholesky decomposition. L is a lower triangular matrix.

        The algorithm described here is due to:
        Smith, W. B. and Hocking, R. R.; Algorithm AS 53: Wishart Variate Generator, Applied Statistician, v.21(341--345), 1972 http://www.jstor.org/stable/2346290

        See also: Gentle, J. E., Random Number Generation and Monte Carlo Methods, 2nd ed., Springer-Verlag, 2003, pp. 199

        Note: If you want to generate an inverse-wishart distribution, simply generate a matrix from Wishart distribution and invert it.

        Parameters:
        n - degree of freedom
        L - square matrix of d x d, lower triangular Cholesky factor of sigma matrix
        rand - Randomizer
        Returns:
        square matrix of d x d

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.