public TargetMean(TargetMeanData td) { this(); this.n = td.n; this.sum = td.sum; this.errorSum = td.errorSum; this.nError = td.nError; this.fadingErrorFactor = td.fadingErrorFactor; this.fadingErrorFactorOption.setValue(td.fadingErrorFactorOptionValue); }
public TargetMean(TargetMeanData td) { this(); this.n = td.n; this.sum = td.sum; this.errorSum = td.errorSum; this.nError = td.nError; this.fadingErrorFactor = td.fadingErrorFactor; this.fadingErrorFactorOption.setValue(td.fadingErrorFactorOptionValue); }
public TargetMean(TargetMeanData td) { this(); this.n = td.n; this.sum = td.sum; this.errorSum = td.errorSum; this.nError = td.nError; this.fadingErrorFactor = td.fadingErrorFactor; this.fadingErrorFactorOption.setValue(td.fadingErrorFactorOptionValue); }
public TargetMean(TargetMeanData td) { this(); this.n = td.n; this.sum = td.sum; this.errorSum = td.errorSum; this.nError = td.nError; this.fadingErrorFactor = td.fadingErrorFactor; this.fadingErrorFactorOption.setValue(td.fadingErrorFactorOptionValue); }
@Override public void applyState() { this.editedOption.setValue(((Double) this.spinner.getValue()).doubleValue()); // this.editedOption.setValue(Double.parseDouble(this.spinner.getValue().toString())); }
@Override public void setValueViaCLIString(String s) { setValue(cliStringToDouble(s)); }
@Override public void setValueViaCLIString(String s) { setValue(cliStringToDouble(s)); }
public static void main(String[] args) throws Exception { //if (true) return; int numInstances = 30; moa.streams.ArffFileStream stream = new ArffFileStream("./datasets/debug_1.txt", -1); //RandomRBFGeneratorEvents stream = new RandomRBFGeneratorEvents(); stream.prepareForUse(); SimpleCOD myOutlierDetector= new SimpleCOD(); myOutlierDetector.kOption.setValue(3); myOutlierDetector.radiusOption.setValue(5); myOutlierDetector.windowSizeOption.setValue(6); myOutlierDetector.setModelContext(stream.getHeader()); myOutlierDetector.prepareForUse(); Long tmStart = System.currentTimeMillis(); int numberSamples = 0; int w = myOutlierDetector.windowSizeOption.getValue(); while (stream.hasMoreInstances() && (numberSamples < numInstances)) { Instance newInst = stream.nextInstance().getData(); myOutlierDetector.processNewInstanceImpl(newInst); numberSamples++; } //myOutlierDetector.PrintOutliers(); System.out.println("Total time = " + (System.currentTimeMillis() - tmStart) + " ms"); } }
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); }