logistic 분포를 따르는 난수 발생기

분포 함수 F(x) = 1 / ( 1 + e ^-x), 밀도 함수 f(x) = e^-x / ( 1 + e^-x )^2 의 분포

평균 0, 분산 pi^2/3 이다. 분포는 정규분포에 가깝지만 끝은 정규 분포보다 길다.

역함수 F-1(x) = log((1-x)/x) 를 이용한다.

Inheritance: RandomizerBase
Ejemplo n.º 1
0
        public void CorrelationCoefficient() {
            const int N = 10000;
            var x = new double[N];
            var y = new double[N];

            var logistics = new LogisticsRandomizer();
            var weibull = new WeibullRandomizer(0.5);

            logistics.Fill(x, 5, 2);
            weibull.Fill(y, 5, 2);

            if(IsDebugEnabled)
                log.Debug("CorrelationCoefficient       = " + x.CorrelationCoefficient(y));
        }
Ejemplo n.º 2
0
        public void CorrelationCoefficient()
        {
            const int N = 10000;
            var       x = new double[N];
            var       y = new double[N];

            var logistics = new LogisticsRandomizer();
            var weibull   = new WeibullRandomizer(0.5);

            logistics.Fill(x, 5, 2);
            weibull.Fill(y, 5, 2);

            if (IsDebugEnabled)
            {
                log.Debug("CorrelationCoefficient       = " + x.CorrelationCoefficient(y));
            }
        }