use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ExpGammaDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("expgamma.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(ExpGammaDistribution.Parameterizer.K_ID, 2.);
params.addParameter(ExpGammaDistribution.Parameterizer.THETA_ID, 1.);
params.addParameter(ExpGammaDistribution.Parameterizer.SHIFT_ID, 0.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ExpGammaDistribution.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 MultiStepGUI method serializeParameters.
/**
* Get the serialized parameters
*
* @return Serialized parameters
*/
public ArrayList<String> serializeParameters() {
ListParameterization params = new ListParameterization();
logTab.appendParameters(params);
inputTab.appendParameters(params);
algTab.appendParameters(params);
evalTab.appendParameters(params);
outTab.appendParameters(params);
return params.serialize();
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ParameterTabPanel method execute.
/**
* Execute the task.
*/
protected synchronized void execute() {
ListParameterization config = new ListParameterization();
parameterTable.appendParameters(config);
runButton.setEnabled(false);
try {
configureStep(config);
if (config.hasUnusedParameters()) {
// List<Pair<OptionID, Object>> remainingParameters =
// config.getRemainingParameters();
LOG.warning("Unused parameters: " + "FIXME");
}
if (config.getErrors().size() > 0) {
reportErrors(config);
} else {
executeStep();
}
} catch (Exception e) {
LOG.exception(e);
}
updateStatus();
firePanelUpdated();
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class CauchyDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("cauchy.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(CauchyDistribution.Parameterizer.LOCATION_ID, .5);
params.addParameter(CauchyDistribution.Parameterizer.SHAPE_ID, 1.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(CauchyDistribution.class, params);
checkPDF(dist, "pdf_gnur_05_1", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ChiSquaredDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("chisq.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(ChiSquaredDistribution.Parameterizer.DOF_ID, 2.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(ChiSquaredDistribution.class, params);
checkPDF(dist, "pdf_scipy_2", 1e-15);
}
Aggregations