当前位置: 首页>>代码示例>>Java>>正文


Java Parameterization.tryInstantiate方法代码示例

本文整理汇总了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();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:18,代码来源:SNNClustering.java

示例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);
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:21,代码来源:VisualizePairwiseGainMatrix.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:16,代码来源:KDDTask.java

示例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;
}
 
开发者ID:elki-project,项目名称:elki,代码行数:9,代码来源:InputTabPanel.java

示例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;
}
 
开发者ID:elki-project,项目名称:elki,代码行数:9,代码来源:AlgorithmTabPanel.java

示例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;
}
 
开发者ID:elki-project,项目名称:elki,代码行数:9,代码来源:OutputTabPanel.java

示例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();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:34,代码来源:GreedyEnsembleExperiment.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:12,代码来源:FastOPTICS.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:28,代码来源:ExportVisualizations.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:15,代码来源:AutomaticVisualization.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:7,代码来源:EMOutlier.java

示例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();
  }
}
 
开发者ID:elki-project,项目名称:elki,代码行数:46,代码来源:ComputeKNNOutlierScores.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:6,代码来源:AbstractStreamingParser.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:5,代码来源:PreDeCon.java

示例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);
}
 
开发者ID:elki-project,项目名称:elki,代码行数:5,代码来源:ERiCNeighborPredicate.java


注:本文中的de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization.tryInstantiate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。