Search in sources :

Example 31 with ListParameterization

use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.

the class ChiDistributionTest method testParameterizer.

@Test
public void testParameterizer() throws ClassInstantiationException {
    load("chi.ascii.gz");
    ListParameterization params = new ListParameterization();
    params.addParameter(ChiDistribution.Parameterizer.DOF_ID, 2.);
    Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ChiDistribution.class, params);
    checkPDF(dist, "pdf_scipy_2", 1e-15);
}
Also used : ListParameterization(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization) Test(org.junit.Test)

Example 32 with ListParameterization

use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.

the class ExponentialDistributionTest method testParameterizer.

@Test
public void testParameterizer() throws ClassInstantiationException {
    load("exp.ascii.gz");
    ListParameterization params = new ListParameterization();
    params.addParameter(ExponentialDistribution.Parameterizer.LOCATION_ID, 0.);
    params.addParameter(ExponentialDistribution.Parameterizer.RATE_ID, .1);
    Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ExponentialDistribution.class, params);
    checkPDF(dist, "pdf_scipy_01", 1e-15);
}
Also used : ListParameterization(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization) Test(org.junit.Test)

Example 33 with ListParameterization

use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.

the class GeneralizedLogisticDistributionTest method testParameterizer.

@Test
public void testParameterizer() throws ClassInstantiationException {
    load("glogistic.ascii.gz");
    ListParameterization params = new ListParameterization();
    params.addParameter(GeneralizedLogisticDistribution.Parameterizer.LOCATION_ID, .5);
    params.addParameter(GeneralizedLogisticDistribution.Parameterizer.SCALE_ID, 1);
    params.addParameter(GeneralizedLogisticDistribution.Parameterizer.SHAPE_ID, 2.);
    Distribution dist = ClassGenericsUtil.parameterizeOrAbort(GeneralizedLogisticDistribution.class, params);
    checkPDF(dist, "pdf_scipy_2_05", 1e-15);
}
Also used : ListParameterization(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization) Test(org.junit.Test)

Example 34 with ListParameterization

use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.

the class LaplaceDistributionTest method testParameterizer.

@Test
public void testParameterizer() throws ClassInstantiationException {
    load("lap.ascii.gz");
    ListParameterization params = new ListParameterization();
    params.addParameter(LaplaceDistribution.Parameterizer.RATE_ID, 1);
    params.addParameter(LaplaceDistribution.Parameterizer.LOCATION_ID, 3);
    Distribution dist = ClassGenericsUtil.parameterizeOrAbort(LaplaceDistribution.class, params);
    checkPDF(dist, "pdf_scipy_1_3", 1e-15);
}
Also used : ListParameterization(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization) Test(org.junit.Test)

Example 35 with ListParameterization

use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.

the class NormalDistributionTest method testParameterizer.

@Test
public void testParameterizer() throws ClassInstantiationException {
    load("norm.ascii.gz");
    ListParameterization params = new ListParameterization();
    params.addParameter(NormalDistribution.Parameterizer.LOCATION_ID, 1.);
    params.addParameter(NormalDistribution.Parameterizer.SCALE_ID, 3.);
    Distribution dist = ClassGenericsUtil.parameterizeOrAbort(NormalDistribution.class, params);
    checkPDF(dist, "pdf_scipy_1_3", 1e-15);
}
Also used : ListParameterization(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization) Test(org.junit.Test)

Aggregations

ListParameterization (de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization)76 Test (org.junit.Test)68 AbstractIndexStructureTest (de.lmu.ifi.dbs.elki.index.AbstractIndexStructureTest)26 Database (de.lmu.ifi.dbs.elki.database.Database)10 AbstractSimpleAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest)9 DoubleVector (de.lmu.ifi.dbs.elki.data.DoubleVector)9 LinearScanDistanceKNNQuery (de.lmu.ifi.dbs.elki.database.query.knn.LinearScanDistanceKNNQuery)8 HilbertSpatialSorter (de.lmu.ifi.dbs.elki.math.spacefillingcurves.HilbertSpatialSorter)6 SpacefillingKNNPreprocessor (de.lmu.ifi.dbs.elki.index.preprocessed.knn.SpacefillingKNNPreprocessor)5 Random (java.util.Random)3 AbstractClusterAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)2 Model (de.lmu.ifi.dbs.elki.data.model.Model)2 StaticArrayDatabase (de.lmu.ifi.dbs.elki.database.StaticArrayDatabase)2 InputStreamDatabaseConnection (de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection)2 MaterializeKNNAndRKNNPreprocessor (de.lmu.ifi.dbs.elki.index.preprocessed.knn.MaterializeKNNAndRKNNPreprocessor)2 NormalDistribution (de.lmu.ifi.dbs.elki.math.statistics.distribution.NormalDistribution)2 NormalMOMEstimator (de.lmu.ifi.dbs.elki.math.statistics.distribution.estimator.NormalMOMEstimator)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 ByLabelClustering (de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelClustering)1