diff options
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java')
-rw-r--r-- | src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java b/src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java index 124abf9e..2a2bb069 100644 --- a/src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java +++ b/src/de/lmu/ifi/dbs/elki/evaluation/histogram/ComputeOutlierHistogram.java @@ -1,26 +1,27 @@ package de.lmu.ifi.dbs.elki.evaluation.histogram;
-/* -This file is part of ELKI: -Environment for Developing KDD-Applications Supported by Index-Structures - -Copyright (C) 2012 -Ludwig-Maximilians-Universität München -Lehr- und Forschungseinheit für Datenbanksysteme -ELKI Development Team - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ +
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures +
+ Copyright (C) 2012
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team +
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version. +
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details. +
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
import java.util.ArrayList;
import java.util.Collection;
@@ -29,7 +30,7 @@ import java.util.regex.Pattern; import de.lmu.ifi.dbs.elki.data.DoubleVector;
import de.lmu.ifi.dbs.elki.database.Database;
-import de.lmu.ifi.dbs.elki.database.ids.DBID;
+import de.lmu.ifi.dbs.elki.database.ids.DBIDIter;
import de.lmu.ifi.dbs.elki.database.ids.DBIDUtil;
import de.lmu.ifi.dbs.elki.database.ids.DBIDs;
import de.lmu.ifi.dbs.elki.database.ids.ModifiableDBIDs;
@@ -68,6 +69,7 @@ import de.lmu.ifi.dbs.elki.utilities.scaling.outlier.OutlierScalingFunction; * @author Erich Schubert
*
* @apiviz.landmark
+ * @apiviz.uses OutlierResult
* @apiviz.has ScalingFunction
* @apiviz.has HistogramResult oneway - - «create»
*/
@@ -186,13 +188,13 @@ public class ComputeOutlierHistogram implements Evaluator { }
ids.removeDBIDs(outlierIds);
// fill histogram with values of each object
- for(DBID id : ids) {
- double result = or.getScores().get(id);
+ for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
+ double result = or.getScores().get(iter);
result = scaling.getScaled(result);
hist.aggregate(result, negative);
}
- for(DBID id : outlierIds) {
- double result = or.getScores().get(id);
+ for(DBIDIter iter = outlierIds.iter(); iter.valid(); iter.advance()) {
+ double result = or.getScores().get(iter);
result = scaling.getScaled(result);
hist.aggregate(result, positive);
}
@@ -223,11 +225,11 @@ public class ComputeOutlierHistogram implements Evaluator { }
/**
- * Parameterization class. - * - * @author Erich Schubert - * - * @apiviz.exclude + * Parameterization class.
+ *
+ * @author Erich Schubert
+ *
+ * @apiviz.exclude
*/
public static class Parameterizer extends AbstractParameterizer {
/**
|