@@ -0,0 +1,2150 @@
+/*%0A * This file is part of ELKI:%0A * Environment for Developing KDD-Applications Supported by Index-Structures%0A *%0A * Copyright (C) 2017%0A * ELKI Development Team%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage de.lmu.ifi.dbs.elki.math.statistics.distribution.estimator;%0A%0Aimport java.util.Random;%0A%0Aimport org.junit.Test;%0A%0Aimport de.lmu.ifi.dbs.elki.math.statistics.distribution.ExponentiallyModifiedGaussianDistribution;%0Aimport de.lmu.ifi.dbs.elki.utilities.datastructures.arraylike.DoubleArrayAdapter;%0A%0A/**%0A * Regression test the Olivier Norberg estimation for the EMG distribution.%0A * %0A * Note: this estimator works only for positively skewed data?%0A * %0A * @author Erich Schubert%0A */%0Apublic class EMGOlivierNorbergEstimatorTest extends AbstractDistributionEstimatorTest %7B%0A  @Test%0A  public void testEstimator() %7B%0A    final EMGOlivierNorbergEstimator est = instantiate(EMGOlivierNorbergEstimator.class, ExponentiallyModifiedGaussianDistribution.class);%0A    ExponentiallyModifiedGaussianDistribution gen = new ExponentiallyModifiedGaussianDistribution(1, 2, .1, new Random(0L));%0A    double%5B%5D data = new double%5B10000%5D;%0A    for(int i = 0; i %3C data.length; i++) %7B%0A      data%5Bi%5D = gen.nextRandom();%0A    %7D%0A    ExponentiallyModifiedGaussianDistribution dist;%0A    dist = est.estimate(data, DoubleArrayAdapter.STATIC);%0A    assertStat(%22mean%22, dist.getMean(), 1, -0.026544709107593434);%0A    assertStat(%22stddev%22, dist.getStddev(), 2, 0.17902812796064094);%0A    assertStat(%22lambda%22, dist.getLambda(), .1, -0.0010032987771384089);%0A  %7D%0A%7D%0A

Add a test for Olivier Norberg EMG estimator.