@Override public void resetLearningImpl() { this.treeRoot = null; this.decisionNodeCount = 0; this.activeLeafNodeCount = 0; this.inactiveLeafNodeCount = 0; this.inactiveLeafByteSizeEstimate = 0.0; this.activeLeafByteSizeEstimate = 0.0; this.byteSizeEstimateOverheadFraction = 1.0; this.maxPredictionPaths = 0; if (this.leafpredictionOption.getChosenIndex() > 0) { this.removePoorAttsOption = null; } }
@Override public String getValueAsCLIString() { return getChosenLabel(); }
public MultiChoiceOption(String name, char cliChar, String purpose, String[] optionLabels, String[] optionDescriptions, int defaultOptionIndex) { super(name, cliChar, purpose); if (optionLabels.length != optionDescriptions.length) { throw new IllegalArgumentException("Labels/descriptions mismatch."); } this.optionLabels = optionLabels.clone(); this.optionDescriptions = optionDescriptions.clone(); this.defaultOptionIndex = defaultOptionIndex; resetToDefault(); }
@Override public void setEditState(String cliString) { MultiChoiceOption tempOpt = (MultiChoiceOption) this.editedOption.copy(); tempOpt.setValueViaCLIString(cliString); setSelectedIndex(tempOpt.getChosenIndex()); } }
@Override public void setValueViaCLIString(String s) { try { setChosenIndex(Integer.parseInt(s.trim())); } catch (NumberFormatException nfe) { setChosenLabel(s); } }
public MultiChoiceOptionEditComponent(Option option) { super(((MultiChoiceOption) option).getOptionLabels()); this.editedOption = (MultiChoiceOption) option; setSelectedIndex(this.editedOption.getChosenIndex()); }
public Iadem3Subtree(Node node, int treeLevel, Iadem3 mainTree, Instance instance) { // subtree configuration from main tree this.numericEstimatorOption.setValueViaCLIString(mainTree.numericEstimatorOption.getValueAsCLIString()); this.gracePeriodOption.setValue(mainTree.gracePeriodOption.getValue()); this.splitCriterionOption.setChosenIndex(mainTree.splitCriterionOption.getChosenIndex()); this.splitConfidenceOption.setValue(mainTree.splitConfidenceOption.getValue()); this.splitTestsOption.setChosenIndex(mainTree.splitTestsOption.getChosenIndex()); this.leafPredictionOption.setChosenIndex(mainTree.leafPredictionOption.getChosenIndex()); this.driftDetectionMethodOption.setValueViaCLIString(mainTree.driftDetectionMethodOption.getValueAsCLIString()); this.attributeDiferentiation.setValue(mainTree.attributeDiferentiation.getValue()); this.maxNestingLevelOption.setValue(mainTree.maxNestingLevelOption.getValue()); this.maxSubtreesPerNodeOption.setValue(mainTree.maxSubtreesPerNodeOption.getValue()); // subtree inicializations this.estimator = mainTree.getEstimatorCopy(); this.errorEstimator = mainTree.getEstimatorCopy(); this.nodo = node; this.mainTree = mainTree; this.mainTree.updateNumberOfLeaves(1); this.mainTree.updateNumberOfNodes(1); createRoot(instance); }
@Override public void applyState() { this.editedOption.setChosenIndex(getSelectedIndex()); }
wekaAlgorithmOption = new MultiChoiceOption("clusterer", 'w', "Weka cluster algorithm to use.", optionLabels, optionDescriptions, 6);
@Override public void setValueViaCLIString(String s) { try { setChosenIndex(Integer.parseInt(s.trim())); } catch (NumberFormatException nfe) { setChosenLabel(s); } }
/** * Refresh the shown contents. */ public void refresh() { setModel(new DefaultComboBoxModel<String>( this.editedOption.getOptionLabels())); setSelectedIndex(this.editedOption.getChosenIndex()); }
@Override public void resetLearningImpl() { this.treeRoot = null; this.decisionNodeCount = 0; this.activeLeafNodeCount = 0; this.inactiveLeafNodeCount = 0; this.inactiveLeafByteSizeEstimate = 0.0; this.activeLeafByteSizeEstimate = 0.0; this.byteSizeEstimateOverheadFraction = 1.0; this.growthAllowed = true; if (this.leafpredictionOption.getChosenIndex()>0) { this.removePoorAttsOption = null; } }
@Override public String getValueAsCLIString() { return getChosenLabel(); }
public MultiChoiceOption(String name, char cliChar, String purpose, String[] optionLabels, String[] optionDescriptions, int defaultOptionIndex) { super(name, cliChar, purpose); if (optionLabels.length != optionDescriptions.length) { throw new IllegalArgumentException("Labels/descriptions mismatch."); } this.optionLabels = optionLabels.clone(); this.optionDescriptions = optionDescriptions.clone(); this.defaultOptionIndex = defaultOptionIndex; resetToDefault(); }
public boolean isOnlyBinaryTest() { return this.splitTestsOption.getChosenIndex() == 0; }
public IademSplitCriterion getMeasure() throws IademException { return new IademSplitCriterion(this.splitCriterionOption.getChosenLabel()); }
public boolean isOnlyMultiwayTest() { return this.splitTestsOption.getChosenIndex() == 2; }
@Override public void getModelDescription(StringBuilder out, int indent) { super.getModelDescription(out, indent); StringUtils.appendIndented(out, indent, "The prediction function used: "+this.predictionFunctionOption.getChosenLabel()); StringUtils.appendNewline(out); }
private double aggregate(double[] predictions, ORTO tree) { if (tree.optionNodeAggregationOption.getChosenIndex() == 0) { // Average double sum = 0.0; for (int i = 0; i < predictions.length; i++) { sum += predictions[i]; } return sum / predictions.length; } else if (tree.optionNodeAggregationOption.getChosenIndex() == 1) { int d = directionForBestTree(); return predictions[d]; } else { return 0.0; } }
.getChosenLabel())) + newLine; script += "set output '" + resultFile.getAbsolutePath() + "'" + newLine; script += "set datafile separator ','" + newLine; script += "set ylabel '" + yTitleOption.getValue() + "'" + newLine; script += "set xlabel '" + xTitleOption.getValue() + "'" + newLine; if (!legendTypeOption.getChosenLabel().equals(LegendType.NONE)) { script += "set key " + legendTypeOption.getChosenLabel().toLowerCase().replace( '_', ' ') + " " + legendLocationOption.getChosenLabel().toLowerCase() .replace('_', ' ') + newLine; script += " with " + plotStyleOption.getChosenLabel().toLowerCase() + " ls " + sourceFileIdx + " lw " + lineWidthOption.getValue(); if (plotStyleOption.getChosenLabel().equals( PlotStyle.LINESPOINTS.toString()) && pointIntervalOption.getValue() > 0) {