use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ExponentiallyModifiedGaussianDistributionTest method testParameterizer.
// TODO: once quantile() is implemented, add a test.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("emg.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(ExponentiallyModifiedGaussianDistribution.Parameterizer.LOCATION_ID, 1.);
params.addParameter(ExponentiallyModifiedGaussianDistribution.Parameterizer.SCALE_ID, 3);
params.addParameter(ExponentiallyModifiedGaussianDistribution.Parameterizer.RATE_ID, .5);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ExponentiallyModifiedGaussianDistribution.class, params);
checkPDF(dist, "pdf_gnur_1_3_05", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ConstantDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
ListParameterization params = new ListParameterization();
params.addParameter(ConstantDistribution.Parameterizer.CONSTANT_ID, 2.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ConstantDistribution.class, params);
assertEquals(dist.nextRandom(), 2, 0.);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class GammaDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("gamma.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(GammaDistribution.Parameterizer.K_ID, 2.);
params.addParameter(GammaDistribution.Parameterizer.THETA_ID, 1.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(GammaDistribution.class, params);
checkPDF(dist, "pdf_scipy_2_1", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class GumbelDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("gumbel.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(GumbelDistribution.Parameterizer.LOCATION_ID, 2.);
params.addParameter(GumbelDistribution.Parameterizer.SHAPE_ID, 1.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(GumbelDistribution.class, params);
checkPDF(dist, "pdf_scipy_2_1", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class InverseGaussianDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("invgauss.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(InverseGaussianDistribution.Parameterizer.LOCATION_ID, .5);
params.addParameter(InverseGaussianDistribution.Parameterizer.SHAPE_ID, 1.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(InverseGaussianDistribution.class, params);
checkPDF(dist, "pdf_scipy_05_1", 1e-15);
}
Aggregations