Пример #1
0
        public double estimateArtaCorrelation(double arAutocorrelation)
        {
            Double result = estimationsCache[arAutocorrelation];

            if (result == 0.0)
            {
                double e        = Integrate(-8, 8, arAutocorrelation);
                double mean     = distribution.getNumericalMean();
                double variance = distribution.getNumericalVariance();
                result = (e - mean * mean) / variance;
                estimationsCache.Add(arAutocorrelation, result);
            }
            return(result);
        }
Пример #2
0
        private double CalculateMinimumFeasibleBivariateCorrelation(RealDistribution distribution)
        {
            double minFBC = 0.0;

            // consider special cases, final else is general approach
            if (distribution is NormalDistribution || distribution is UniformRealDistribution || distribution is TDistribution)
            {
                minFBC = -1.0;
            }
            else if (distribution is ExponentialDistribution)
            {
                minFBC = 1.0 - Math.PI * Math.PI / 6.0;
            }
            else
            {
                double mean     = distribution.getNumericalMean();
                double variance = distribution.getNumericalVariance();
                double integral = integrator.integrate(IterativeLegendreGaussIntegrator.DEFAULT_MAX_ITERATIONS_COUNT, new UnivariatDistributionFunction(distribution), 0.0, 1.0);
                minFBC = (integral - mean * mean) / variance;
            }

            return(minFBC);
        }