internal void Process(int iterationCount, IQuantileEstimator baselineEstimator) { var distribution = ReferenceDistribution.Distribution; double quantileTrueValue = distribution.Quantile(Probability); var randomGenerator = distribution.Random(Random.Value); double[] efficiencies = new double[19]; for (int i = 0; i < efficiencies.Length; i++) { double targetMse = 0, baselineMse = 0; for (int iteration = 0; iteration < iterationCount; iteration++) { var sample = new Sample(randomGenerator.Next(SampleSize)); targetMse += (Estimator.GetQuantile(sample, Probability) - quantileTrueValue).Sqr(); baselineMse += (baselineEstimator.GetQuantile(sample, Probability) - quantileTrueValue).Sqr(); } efficiencies[i] = baselineMse / targetMse; } RelativeEfficiency = EfficiencyEstimator.GetMedian(new Sample(efficiencies)); }