本文整理汇总了Java中de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization.tryInstantiate方法的典型用法代码示例。如果您正苦于以下问题:Java Parameterization.tryInstantiate方法的具体用法?Java Parameterization.tryInstantiate怎么用?Java Parameterization.tryInstantiate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization
的用法示例。
在下文中一共展示了Parameterization.tryInstantiate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Class<SharedNearestNeighborSimilarityFunction<O>> cls = ClassGenericsUtil.uglyCastIntoSubclass(SharedNearestNeighborSimilarityFunction.class);
similarityFunction = config.tryInstantiate(cls);
IntParameter epsilonP = new IntParameter(EPSILON_ID);
if(config.grab(epsilonP)) {
epsilon = epsilonP.getValue();
}
IntParameter minptsP = new IntParameter(MINPTS_ID);
minptsP.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minptsP)) {
minpts = minptsP.intValue();
}
}
示例2: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
// Data input
inputstep = config.tryInstantiate(InputStep.class);
// Visualization options
vispar = config.tryInstantiate(VisualizerParameterizer.class);
// Prescaling
ObjectParameter<ScalingFunction> prescalingP = new ObjectParameter<>(GreedyEnsembleExperiment.Parameterizer.PRESCALING_ID, ScalingFunction.class);
prescalingP.setOptional(true);
if(config.grab(prescalingP)) {
prescaling = prescalingP.instantiateClass(config);
}
ObjectParameter<EnsembleVoting> votingP = new ObjectParameter<>(GreedyEnsembleExperiment.Parameterizer.VOTING_ID, EnsembleVoting.class, EnsembleVotingMean.class);
if(config.grab(votingP)) {
voting = votingP.instantiateClass(config);
}
}
示例3: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
// Track the key parameters for reporting the settings.
TrackParameters track = new TrackParameters(config);
inputStep = track.tryInstantiate(InputStep.class);
algorithmStep = track.tryInstantiate(AlgorithmStep.class);
evaluationStep = track.tryInstantiate(EvaluationStep.class);
// We don't include output parameters
settings = track.getAllParameters();
// configure output with the original parameterization
outputStep = config.tryInstantiate(OutputStep.class);
}
示例4: configureStep
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected synchronized void configureStep(Parameterization config) {
input = config.tryInstantiate(InputStep.class);
if (config.getErrors().size() > 0) {
input = null;
}
executed = false;
}
示例5: configureStep
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected synchronized void configureStep(Parameterization config) {
algorithms = config.tryInstantiate(AlgorithmStep.class);
if (config.getErrors().size() > 0) {
algorithms = null;
}
basedOnDatabase = null;
}
示例6: configureStep
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected synchronized void configureStep(Parameterization config) {
outs = config.tryInstantiate(OutputStep.class);
if(config.getErrors().size() > 0) {
outs = null;
}
basedOnResult = null;
}
示例7: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
// Data input
inputstep = config.tryInstantiate(InputStep.class);
// Voting method
ObjectParameter<EnsembleVoting> votingP = new ObjectParameter<>(VOTING_ID, EnsembleVoting.class, EnsembleVotingMean.class);
if(config.grab(votingP)) {
voting = votingP.instantiateClass(config);
}
// Similarity measure
EnumParameter<Distance> distanceP = new EnumParameter<>(DISTANCE_ID, Distance.class);
if(config.grab(distanceP)) {
distance = distanceP.getValue();
}
// Prescaling
ObjectParameter<ScalingFunction> prescalingP = new ObjectParameter<>(PRESCALING_ID, ScalingFunction.class);
prescalingP.setOptional(true);
if(config.grab(prescalingP)) {
prescaling = prescalingP.instantiateClass(config);
}
// Ensemble scaling
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class);
scalingP.setOptional(true);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
// Expected rate of outliers
DoubleParameter rateP = new DoubleParameter(RATE_ID, 0.01);
if(config.grab(rateP)) {
rate = rateP.doubleValue();
}
}
示例8: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
IntParameter minptsP = new IntParameter(AbstractOPTICS.Parameterizer.MINPTS_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(minptsP)) {
minpts = minptsP.intValue();
}
Class<RandomProjectedNeighborsAndDensities<V>> clz = ClassGenericsUtil.uglyCastIntoSubclass(RandomProjectedNeighborsAndDensities.class);
index = config.tryInstantiate(clz);
}
示例9: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
FileParameter outputP = new FileParameter(FOLDER_ID, FileType.OUTPUT_FILE);
if(config.grab(outputP)) {
output = outputP.getValue();
}
DoubleParameter ratioP = new DoubleParameter(RATIO_ID, 1.33);
ratioP.addConstraint(CommonConstraints.GREATER_THAN_ZERO_DOUBLE);
if(config.grab(ratioP)) {
ratio = ratioP.doubleValue();
}
EnumParameter<Format> formatP = new EnumParameter<>(FORMAT_ID, Format.class, Format.SVG);
if(config.grab(formatP)) {
format = formatP.getValue();
}
if(format == Format.PNG || format == Format.JPEG) {
IntParameter iwidthP = new IntParameter(IWIDTH_ID, 1000);
if(config.grab(iwidthP)) {
iwidth = iwidthP.intValue();
}
}
manager = config.tryInstantiate(VisualizerParameterizer.class);
}
示例10: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
StringParameter titleP = new StringParameter(WINDOW_TITLE_ID);
titleP.setOptional(true);
if(config.grab(titleP)) {
title = titleP.getValue();
}
Flag singleF = new Flag(SINGLE_ID);
if(config.grab(singleF)) {
single = singleF.isTrue();
}
manager = config.tryInstantiate(VisualizerParameterizer.class);
}
示例11: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
Class<EM<V, ?>> cls = ClassGenericsUtil.uglyCastIntoSubclass(EM.class);
em = config.tryInstantiate(cls);
}
示例12: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
// Data input
inputstep = config.tryInstantiate(InputStep.class);
// Distance function
ObjectParameter<DistanceFunction<? super O>> distP = AbstractAlgorithm.makeParameterDistanceFunction(EuclideanDistanceFunction.class, DistanceFunction.class);
if(config.grab(distP)) {
distf = distP.instantiateClass(config);
}
// k parameters
IntParameter stepkP = new IntParameter(STEPK_ID) //
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(stepkP)) {
stepk = stepkP.getValue();
}
IntParameter startkP = new IntParameter(STARTK_ID);
startkP.setOptional(true);
if(config.grab(startkP)) {
startk = startkP.getValue();
}
else {
startk = stepk;
}
IntParameter maxkP = new IntParameter(MAXK_ID)//
.addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT);
if(config.grab(maxkP)) {
maxk = maxkP.getValue();
}
bylabel = config.tryInstantiate(ByLabelOutlier.class);
// Output
outfile = super.getParameterOutputFile(config, "File to output the resulting score vectors to.");
ObjectParameter<ScalingFunction> scalingP = new ObjectParameter<>(SCALING_ID, ScalingFunction.class);
scalingP.setOptional(true);
if(config.grab(scalingP)) {
scaling = scalingP.instantiateClass(config);
}
PatternParameter disableP = new PatternParameter(DISABLE_ID) //
.setOptional(true);
if(config.grab(disableP)) {
disable = disableP.getValue();
}
}
示例13: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
super.makeOptions(config);
format = config.tryInstantiate(CSVReaderFormat.class);
}
示例14: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
settings = config.tryInstantiate(PreDeCon.Settings.class);
}
示例15: makeOptions
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; //导入方法依赖的package包/类
@Override
protected void makeOptions(Parameterization config) {
settings = config.tryInstantiate(ERiC.Settings.class);
}