polya gamma:纯Java中Polya Gamma分布的有效采样器 源码
聚γ 纯Java中Polya-Gamma分布的高效采样器。 它还与其他发行版兼容。 例子 // use default sampler PolyaGammaDistribution pg1 = new PolyaGammaDistribution ( 2 , 4 ); double x = pg1 . sample(); double mean = pg1 . getNumericalMean(); double vari = pg1 . getNumericalVariance(); // select sampler explicitly PolyaGammaDistribution pg2 = new PolyaGammaDistribution ( 2 , 4 , PolyaGammaDistribution . AvailableSampler . Gaussian );
用户评论