use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class LogNormalDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("lognorm.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(LogNormalDistribution.Parameterizer.LOGMEAN_ID, 1.);
params.addParameter(LogNormalDistribution.Parameterizer.LOGSTDDEV_ID, 3.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(LogNormalDistribution.class, params);
checkPDF(dist, "pdf_scipy_1_3", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class SkewGeneralizedNormalDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("skewnorm.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(SkewGeneralizedNormalDistribution.Parameterizer.LOCATION_ID, 1.);
params.addParameter(SkewGeneralizedNormalDistribution.Parameterizer.SCALE_ID, 2.);
params.addParameter(SkewGeneralizedNormalDistribution.Parameterizer.SKEW_ID, 3.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(SkewGeneralizedNormalDistribution.class, params);
checkPDF(dist, "pdf_gnur_1_2_3", 1e-15);
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class BetaDistributionTest method testParameterizer.
@Test
public void testParameterizer() throws ClassInstantiationException {
load("beta.ascii.gz");
ListParameterization params = new ListParameterization();
params.addParameter(BetaDistribution.Parameterizer.ALPHA_ID, 2.);
params.addParameter(BetaDistribution.Parameterizer.BETA_ID, 1.);
Distribution dist = ClassGenericsUtil.parameterizeOrAbort(BetaDistribution.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 addPanels.
private void addPanels(JTabbedPane panels) {
SavedSettingsFile settings = new SavedSettingsFile(MiniGUI.SAVED_SETTINGS_FILENAME);
try {
settings.load();
} catch (FileNotFoundException e) {
LOG.warning("Error loading saved settings.", e);
} catch (IOException e) {
LOG.exception(e);
}
inputTab = new InputTabPanel();
algTab = new AlgorithmTabPanel(inputTab);
evalTab = new EvaluationTabPanel(inputTab, algTab);
outTab = new OutputTabPanel(inputTab, evalTab);
logTab = new LoggingTabPanel();
setTab = new SavedSettingsTabPanel(settings, this);
panels.addTab("Input", inputTab);
panels.addTab("Algorithm", algTab);
panels.addTab("Evaluation", evalTab);
panels.addTab("Output", outTab);
panels.addTab("Logging", logTab);
panels.addTab("Saved Settings", setTab);
setParameters(new ListParameterization());
}
use of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization in project elki by elki-project.
the class ParameterTabPanel method updateParameterTable.
/**
* Serialize the parameter table and run setParameters()
*/
protected void updateParameterTable() {
parameterTable.setEnabled(false);
ListParameterization config = new ListParameterization();
parameterTable.appendParameters(config);
setParameters(config);
if (config.getErrors().size() > 0) {
reportErrors(config);
}
config.clearErrors();
parameterTable.setEnabled(true);
}
Aggregations