當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。