summaryrefslogtreecommitdiff
path: root/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof
diff options
context:
space:
mode:
Diffstat (limited to 'elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof')
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java63
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COF.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOF.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.java17
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDF.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOF.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCI.java108
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOF.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOP.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOF.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOF.java3
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOF.java5
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LOFProcessor.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LRDProcessor.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOF.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOF.java1
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/SimplifiedLRDProcessor.java1
19 files changed, 133 insertions, 87 deletions
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java
index f7edae0f..e0fefe2d 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCI.java
@@ -55,6 +55,7 @@ import de.lmu.ifi.dbs.elki.math.random.RandomFactory;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierScoreMeta;
import de.lmu.ifi.dbs.elki.result.outlier.QuotientOutlierScoreMeta;
+import de.lmu.ifi.dbs.elki.utilities.Alias;
import de.lmu.ifi.dbs.elki.utilities.documentation.Description;
import de.lmu.ifi.dbs.elki.utilities.documentation.Reference;
import de.lmu.ifi.dbs.elki.utilities.documentation.Title;
@@ -67,27 +68,31 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.RandomParameter;
/**
* Fast Outlier Detection Using the "approximate Local Correlation Integral".
- *
+ *
* Outlier detection using multiple epsilon neighborhoods.
- *
+ *
* Reference:
* <p>
- * S. Papadimitriou, H. Kitagawa, P. B. Gibbons and C. Faloutsos:<br />
- * LOCI: Fast Outlier Detection Using the Local Correlation Integral.<br />
- * In: Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03), Bangalore,
- * India, 2003.
+ * S. Papadimitriou, H. Kitagawa, P. B. Gibbons and C. Faloutsos: <br />
+ * LOCI: Fast Outlier Detection Using the Local Correlation Integral. <br />
+ * In: Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03)
* </p>
- *
+ *
* @author Jonathan von Brünken
* @author Erich Schubert
- *
+ * @since 0.5.0
+ *
* @apiviz.composedOf ALOCIQuadTree
- *
+ *
* @param <O> Object type
*/
@Title("LOCI: Fast Outlier Detection Using the Local Correlation Integral")
@Description("Algorithm to compute outliers based on the Local Correlation Integral")
-@Reference(authors = "S. Papadimitriou, H. Kitagawa, P. B. Gibbons, C. Faloutsos", title = "LOCI: Fast Outlier Detection Using the Local Correlation Integral", booktitle = "Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03), Bangalore, India, 2003", url = "http://dx.doi.org/10.1109/ICDE.2003.1260802")
+@Reference(authors = "S. Papadimitriou, H. Kitagawa, P. B. Gibbons, C. Faloutsos", //
+title = "LOCI: Fast Outlier Detection Using the Local Correlation Integral", //
+booktitle = "Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03)", //
+url = "http://dx.doi.org/10.1109/ICDE.2003.1260802")
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.ALOCI")
public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
@@ -121,7 +126,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Constructor.
- *
+ *
* @param distanceFunction Distance function
* @param nmin Minimum neighborhood size
* @param alpha Alpha value
@@ -246,10 +251,10 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Method for the MDEF calculation
- *
+ *
* @param sn Sampling Neighborhood
* @param cg Counting Neighborhood
- *
+ *
* @return MDEF norm
*/
private static double calculate_MDEF_norm(Node sn, Node cg) {
@@ -294,13 +299,13 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Simple quadtree for ALOCI. Not storing the actual objects, just the counts.
- *
+ *
* Furthermore, the quadtree can be shifted by a specified vector, wrapping
* around min/max
- *
+ *
* @author Jonathan von Brünken
* @author Erich Schubert
- *
+ *
* @apiviz.composedOf Node
*/
static class ALOCIQuadTree {
@@ -326,7 +331,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Constructor.
- *
+ *
* @param min Minimum coordinates
* @param max Maximum coordinates
* @param shift Tree shift offset
@@ -364,7 +369,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Bulk load the tree
- *
+ *
* @param lmin Subtree minimum (unshifted, will be modified)
* @param lmax Subtree maximum (unshifted, will be modified)
* @param children List of children for current parent
@@ -461,7 +466,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Shift and wrap a single dimension.
- *
+ *
* @param obj Object
* @param dim Dimension
* @param level Level (controls scaling/wraping!)
@@ -476,7 +481,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Find the closest node (of depth tlevel or above, if there is no node at
* this depth) for the given vector.
- *
+ *
* @param vec Query vector
* @param tlevel Target level
* @return Node
@@ -511,7 +516,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Node of the ALOCI Quadtree
- *
+ *
* @author Erich Schubert
*/
static class Node {
@@ -547,7 +552,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Constructor.
- *
+ *
* @param code Node code
* @param center Center vector
* @param count Element count
@@ -569,7 +574,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Get level of node.
- *
+ *
* @return Level of node
*/
public int getLevel() {
@@ -578,7 +583,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Get count of subtree
- *
+ *
* @return subtree count
*/
public int getCount() {
@@ -587,7 +592,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Return center vector
- *
+ *
* @return center vector
*/
public Vector getCenter() {
@@ -596,7 +601,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Get sum of squares, recursively
- *
+ *
* @param levels Depth to collect
* @return Sum of squares
*/
@@ -613,7 +618,7 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Get cubic sum.
- *
+ *
* @param levels Level to collect
* @return sum of cubes
*/
@@ -631,9 +636,9 @@ public class ALOCI<O extends NumberVector> extends AbstractAlgorithm<OutlierResu
/**
* Parameterization class.
- *
+ *
* @author Erich Schubert
- *
+ *
* @apiviz.exclude
*/
public static class Parameterizer<O extends NumberVector> extends AbstractParameterizer {
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COF.java
index 87019ae6..61cb915f 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COF.java
@@ -67,6 +67,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.2
*
* @param <O> Object type
*/
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOF.java
index e38e8da2..eae6f530 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOF.java
@@ -107,6 +107,7 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
* @author Peer Kröger
* @author Erich Schubert
* @author Elke Achtert
+ * @since 0.2
*
* @apiviz.has LOFResult oneway - - computes
* @apiviz.has KNNQuery
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java
index 1e77cab5..375031f9 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLO.java
@@ -49,6 +49,7 @@ import de.lmu.ifi.dbs.elki.math.DoubleMinMax;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierScoreMeta;
import de.lmu.ifi.dbs.elki.result.outlier.QuotientOutlierScoreMeta;
+import de.lmu.ifi.dbs.elki.utilities.Alias;
import de.lmu.ifi.dbs.elki.utilities.documentation.Description;
import de.lmu.ifi.dbs.elki.utilities.documentation.Reference;
import de.lmu.ifi.dbs.elki.utilities.documentation.Title;
@@ -72,6 +73,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
*
* @author Ahmed Hettab
* @author Erich Schubert
+ * @since 0.3
*
* @apiviz.has KNNQuery
*
@@ -83,6 +85,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
title = "Ranking outliers using symmetric neighborhood relationship", //
booktitle = "Proc. 10th Pacific-Asia conference on Advances in Knowledge Discovery and Data Mining", //
url = "http://dx.doi.org/10.1007/11731139_68")
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.INFLO")
public class INFLO<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.java
index 1583ac99..92f0d7a9 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOS.java
@@ -93,6 +93,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has KNNQuery
* @apiviz.has KernelDensityFunction
@@ -203,7 +204,7 @@ public class KDEOS<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult>im
densities.put(iter, new double[knum]);
}
// Distribute densities:
- FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Computing densities.", ids.size(), LOG) : null;
+ FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Computing densities", ids.size(), LOG) : null;
double iminbw = (minBandwidth > 0.) ? 1. / (minBandwidth * scale) : Double.POSITIVE_INFINITY;
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
KNNList neighbors = knnq.getKNNForDBID(iter, kmax + 1);
@@ -269,7 +270,7 @@ public class KDEOS<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult>im
*/
protected void computeOutlierScores(KNNQuery<O> knnq, final DBIDs ids, WritableDataStore<double[]> densities, WritableDoubleDataStore kdeos, DoubleMinMax minmax) {
final int knum = kmax + 1 - kmin;
- FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Computing KDEOS scores.", ids.size(), LOG) : null;
+ FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Computing KDEOS scores", ids.size(), LOG) : null;
double[][] scratch = new double[knum][kmax + 5];
MeanVariance mv = new MeanVariance();
@@ -339,32 +340,32 @@ public class KDEOS<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult>im
/**
* Parameter to specify the kernel density function.
*/
- private static final OptionID KERNEL_ID = new OptionID("kdeos.kernel", "Kernel density function to use.");
+ public static final OptionID KERNEL_ID = new OptionID("kdeos.kernel", "Kernel density function to use.");
/**
* Parameter to specify the minimum bandwidth.
*/
- private static final OptionID KERNEL_MIN_ID = new OptionID("kdeos.kernel.minbw", "Minimum bandwidth for kernel density estimation.");
+ public static final OptionID KERNEL_MIN_ID = new OptionID("kdeos.kernel.minbw", "Minimum bandwidth for kernel density estimation.");
/**
* Parameter to specify the kernel scaling factor.
*/
- private static final OptionID KERNEL_SCALE_ID = new OptionID("kdeos.kernel.scale", "Scaling factor for the kernel function.");
+ public static final OptionID KERNEL_SCALE_ID = new OptionID("kdeos.kernel.scale", "Scaling factor for the kernel function.");
/**
* Minimum value of k to analyze.
*/
- private static final OptionID KMIN_ID = new OptionID("kdeos.k.min", "Minimum value of k to analyze.");
+ public static final OptionID KMIN_ID = new OptionID("kdeos.k.min", "Minimum value of k to analyze.");
/**
* Maximum value of k to analyze.
*/
- private static final OptionID KMAX_ID = new OptionID("kdeos.k.max", "Maximum value of k to analyze.");
+ public static final OptionID KMAX_ID = new OptionID("kdeos.k.max", "Maximum value of k to analyze.");
/**
* Intrinsic dimensionality.
*/
- private static final OptionID IDIM_ID = new OptionID("kdeos.idim", "Intrinsic dimensionality of this data set. Use -1 for using the true data dimensionality, but values such as 0-2 often offer better performance.");
+ public static final OptionID IDIM_ID = new OptionID("kdeos.idim", "Intrinsic dimensionality of this data set. Use -1 for using the true data dimensionality, but values such as 0-2 often offer better performance.");
/**
* Kernel function to use for density estimation.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDF.java
index 056a6ba3..c4067504 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDF.java
@@ -54,6 +54,7 @@ import de.lmu.ifi.dbs.elki.math.statistics.kernelfunctions.KernelDensityFunction
import de.lmu.ifi.dbs.elki.result.outlier.BasicOutlierScoreMeta;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierScoreMeta;
+import de.lmu.ifi.dbs.elki.utilities.Alias;
import de.lmu.ifi.dbs.elki.utilities.DatabaseUtil;
import de.lmu.ifi.dbs.elki.utilities.documentation.Reference;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID;
@@ -77,6 +78,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.5.5
*
* @apiviz.has KNNQuery
* @apiviz.has KernelDensityFunction
@@ -87,6 +89,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter;
title = "Outlier Detection with Kernel Density Functions", //
booktitle = "Machine Learning and Data Mining in Pattern Recognition", //
url = "http://dx.doi.org/10.1007/978-3-540-73499-4_6")
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.LDF")
public class LDF<O extends NumberVector> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOF.java
index b41af3bd..9dadf0e3 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOF.java
@@ -71,6 +71,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Arthur Zimek
+ * @since 0.3
*
* @apiviz.has KNNQuery
*
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCI.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCI.java
index 7b332639..f8623bcc 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCI.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCI.java
@@ -63,26 +63,33 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
/**
* Fast Outlier Detection Using the "Local Correlation Integral".
- *
+ *
* Exact implementation only, not aLOCI. See {@link ALOCI}.
- *
+ *
* Outlier detection using multiple epsilon neighborhoods.
- *
+ *
* This implementation has O(n<sup>3</sup> log n) runtime complexity!
- *
- * Based on: S. Papadimitriou, H. Kitagawa, P. B. Gibbons and C. Faloutsos:
- * LOCI: Fast Outlier Detection Using the Local Correlation Integral. In: Proc.
- * 19th IEEE Int. Conf. on Data Engineering (ICDE '03), Bangalore, India, 2003.
- *
+ *
+ * Reference:
+ * <p>
+ * S. Papadimitriou, H. Kitagawa, P. B. Gibbons and C. Faloutsos: <br />
+ * LOCI: Fast Outlier Detection Using the Local Correlation Integral. <br />
+ * In: Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03)
+ * </p>
+ *
* @author Erich Schubert
- *
+ * @since 0.2
+ *
* @apiviz.has RangeQuery
- *
+ *
* @param <O> Object type
*/
@Title("LOCI: Fast Outlier Detection Using the Local Correlation Integral")
@Description("Algorithm to compute outliers based on the Local Correlation Integral")
-@Reference(authors = "S. Papadimitriou, H. Kitagawa, P. B. Gibbons, C. Faloutsos", title = "LOCI: Fast Outlier Detection Using the Local Correlation Integral", booktitle = "Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03), Bangalore, India, 2003", url = "http://dx.doi.org/10.1109/ICDE.2003.1260802")
+@Reference(authors = "S. Papadimitriou, H. Kitagawa, P. B. Gibbons, C. Faloutsos", //
+title = "LOCI: Fast Outlier Detection Using the Local Correlation Integral", //
+booktitle = "Proc. 19th IEEE Int. Conf. on Data Engineering (ICDE '03)", //
+url = "http://dx.doi.org/10.1109/ICDE.2003.1260802")
@Alias({ "de.lmu.ifi.dbs.elki.algorithm.outlier.LOCI" })
public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
@@ -91,39 +98,23 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
private static final Logging LOG = Logging.getLogger(LOCI.class);
/**
- * Parameter to specify the maximum radius of the neighborhood to be
- * considered, must be suitable to the distance function specified.
- */
- public static final OptionID RMAX_ID = new OptionID("loci.rmax", "The maximum radius of the neighborhood to be considered.");
-
- /**
- * Parameter to specify the minimum neighborhood size
- */
- public static final OptionID NMIN_ID = new OptionID("loci.nmin", "Minimum neighborhood size to be considered.");
-
- /**
- * Parameter to specify the averaging neighborhood scaling.
- */
- public static final OptionID ALPHA_ID = new OptionID("loci.alpha", "Scaling factor for averaging neighborhood");
-
- /**
- * Holds the value of {@link #RMAX_ID}.
+ * Maximum radius.
*/
private double rmax;
/**
- * Holds the value of {@link #NMIN_ID}.
+ * Minimum neighborhood size.
*/
- private int nmin;
+ private int nmin = 0;
/**
- * Holds the value of {@link #ALPHA_ID}.
+ * Scaling of averaging neighborhood.
*/
- private double alpha;
+ private double alpha = 0.5;
/**
* Constructor.
- *
+ *
* @param distanceFunction Distance function
* @param rmax Maximum radius
* @param nmin Minimum neighborhood size
@@ -138,7 +129,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Run the algorithm
- *
+ *
* @param database Database to process
* @param relation Relation to process
* @return Outlier result
@@ -228,7 +219,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Preprocessing step: determine the radii of interest for each point.
- *
+ *
* @param ids IDs to process
* @param rangeQuery Range query
* @param interestingDistances Distances of interest
@@ -284,7 +275,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Array of double-int values.
- *
+ *
* @author Erich Schubert
*
* @apiviz.exclude
@@ -307,7 +298,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Constructor.
- *
+ *
* @param alloc Initial allocation.
*/
public DoubleIntArrayList(int alloc) {
@@ -318,7 +309,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Collection size.
- *
+ *
* @return Size
*/
public int size() {
@@ -327,7 +318,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Get the key at the given position.
- *
+ *
* @param i Position
* @return Key
*/
@@ -337,7 +328,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Get the value at the given position.
- *
+ *
* @param i Position
* @return Value
*/
@@ -347,7 +338,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Get the value at the given position.
- *
+ *
* @param i Position
* @param val New value
*/
@@ -357,7 +348,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Append a key-value pair.
- *
+ *
* @param key Key to append
* @param val Value to append.
*/
@@ -373,7 +364,7 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Find the last position with a smaller or equal key.
- *
+ *
* @param search Key
* @return Position
*/
@@ -412,18 +403,43 @@ public class LOCI<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> im
/**
* Parameterization class.
- *
+ *
* @author Erich Schubert
- *
+ *
* @apiviz.exclude
- *
+ *
* @param <O> Object type
*/
public static class Parameterizer<O> extends AbstractDistanceBasedAlgorithm.Parameterizer<O> {
+ /**
+ * Parameter to specify the maximum radius of the neighborhood to be
+ * considered, must be suitable to the distance function specified.
+ */
+ public static final OptionID RMAX_ID = new OptionID("loci.rmax", "The maximum radius of the neighborhood to be considered.");
+
+ /**
+ * Parameter to specify the minimum neighborhood size
+ */
+ public static final OptionID NMIN_ID = new OptionID("loci.nmin", "Minimum neighborhood size to be considered.");
+
+ /**
+ * Parameter to specify the averaging neighborhood scaling.
+ */
+ public static final OptionID ALPHA_ID = new OptionID("loci.alpha", "Scaling factor for averaging neighborhood");
+
+ /**
+ * Maximum radius.
+ */
protected double rmax;
+ /**
+ * Minimum neighborhood size.
+ */
protected int nmin = 0;
+ /**
+ * Scaling of averaging neighborhood.
+ */
protected double alpha = 0.5;
@Override
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOF.java
index 87b1be8c..52fbeafc 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOF.java
@@ -87,6 +87,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
*
* @author Erich Schubert
* @author Elke Achtert
+ * @since 0.2
*
* @apiviz.has KNNQuery
*
@@ -98,7 +99,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
title = "LOF: Identifying Density-Based Local Outliers", //
booktitle = "Proc. 2nd ACM SIGMOD Int. Conf. on Management of Data (SIGMOD '00), Dallas, TX, 2000", //
url = "http://dx.doi.org/10.1145/342009.335388")
-@Alias({ "de.lmu.ifi.dbs.elki.algorithm.outlier.LOF", "LOF" })
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.LOF")
public class LOF<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOP.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOP.java
index 48589698..16f46a33 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOP.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOP.java
@@ -90,6 +90,7 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
* </ul>
*
* @author Erich Schubert
+ * @since 0.3
*
* @apiviz.has KNNQuery
*
@@ -101,7 +102,7 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
title = "LoOP: Local Outlier Probabilities", //
booktitle = "Proceedings of the 18th International Conference on Information and Knowledge Management (CIKM), Hong Kong, China, 2009", //
url = "http://dx.doi.org/10.1145/1645953.1646195")
-@Alias({ "de.lmu.ifi.dbs.elki.algorithm.outlier.LoOP", "LoOP" })
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.LoOP")
public class LoOP<O> extends AbstractAlgorithm<OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOF.java
index 715d3c0e..6a9344b3 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOF.java
@@ -53,6 +53,7 @@ import de.lmu.ifi.dbs.elki.logging.progress.StepProgress;
import de.lmu.ifi.dbs.elki.math.DoubleMinMax;
import de.lmu.ifi.dbs.elki.result.outlier.BasicOutlierScoreMeta;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.Alias;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
@@ -63,10 +64,12 @@ import de.lmu.ifi.dbs.elki.utilities.pairs.Pair;
* BUG: this currently does not appear to work.
*
* @author Elke Achtert
+ * @since 0.2
*
* @apiviz.has FlexibleLOF.LOFResult oneway - - updates
*/
// TODO: related to publication?
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.OnlineLOF")
public class OnlineLOF<O> extends FlexibleLOF<O> {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOF.java
index af32988e..80c41e57 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOF.java
@@ -54,6 +54,7 @@ import de.lmu.ifi.dbs.elki.math.statistics.kernelfunctions.KernelDensityFunction
import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
import de.lmu.ifi.dbs.elki.result.outlier.OutlierScoreMeta;
import de.lmu.ifi.dbs.elki.result.outlier.QuotientOutlierScoreMeta;
+import de.lmu.ifi.dbs.elki.utilities.Alias;
import de.lmu.ifi.dbs.elki.utilities.DatabaseUtil;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.constraints.CommonConstraints;
@@ -66,12 +67,14 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter;
* estimation instead of the local reachability density.
*
* @author Erich Schubert
+ * @since 0.5.5
*
* @apiviz.has KNNQuery
* @apiviz.has KernelDensityFunction
*
* @param <O> the type of objects handled by this Algorithm
*/
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.SimpleKernelDensityLOF")
public class SimpleKernelDensityLOF<O extends NumberVector> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOF.java
index 17ebdabf..5705e7aa 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOF.java
@@ -68,6 +68,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.5.5
*
* @apiviz.has KNNQuery
*
@@ -77,7 +78,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
title = "Local Outlier Detection Reconsidered: a Generalized View on Locality with Applications to Spatial, Video, and Network Outlier Detection", //
booktitle = "Data Mining and Knowledge Discovery, 28(1): 190–237, 2014.", //
url = "http://dx.doi.org/10.1007/s10618-012-0300-z")
-@Alias({ "SimplifiedLOF", "outlier.SimplifiedLOF", "de.lmu.ifi.dbs.elki.algorithm.outlier.SimplifiedLOF" })
+@Alias("de.lmu.ifi.dbs.elki.algorithm.outlier.SimpleLOF")
public class SimplifiedLOF<O> extends AbstractDistanceBasedAlgorithm<O, OutlierResult> implements OutlierAlgorithm {
/**
* The logger for this class.
@@ -172,7 +173,7 @@ public class SimplifiedLOF<O> extends AbstractDistanceBasedAlgorithm<O, OutlierR
* @param lofminmax Minimum and maximum scores
*/
private void computeSimplifiedLOFs(DBIDs ids, KNNQuery<O> knnq, WritableDoubleDataStore slrds, WritableDoubleDataStore lofs, DoubleMinMax lofminmax) {
- FiniteProgress progressLOFs = LOG.isVerbose() ? new FiniteProgress("Simplified LOF scores.", ids.size(), LOG) : null;
+ FiniteProgress progressLOFs = LOG.isVerbose() ? new FiniteProgress("Simplified LOF scores", ids.size(), LOG) : null;
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
final double lof;
final double lrdp = slrds.doubleValue(iter);
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
index 3dffe213..93f62bea 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolume.java
@@ -77,6 +77,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has KNNQuery
*
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LOFProcessor.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LOFProcessor.java
index 095a1b5b..c6c7b315 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LOFProcessor.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LOFProcessor.java
@@ -37,6 +37,7 @@ import de.lmu.ifi.dbs.elki.parallel.variables.SharedDouble;
* Processor for computing the LOF.
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has Instance
*/
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LRDProcessor.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LRDProcessor.java
index e9c48cbf..c21a45af 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LRDProcessor.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/LRDProcessor.java
@@ -38,6 +38,7 @@ import de.lmu.ifi.dbs.elki.parallel.variables.SharedDouble;
* Processor for the "local reachability density" of LOF.
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has Instance
*/
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOF.java
index 59b69931..04b7f1da 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOF.java
@@ -71,6 +71,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has LRDProcessor
* @apiviz.has LOFProcessor
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOF.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOF.java
index 9be38c34..d57972e3 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOF.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOF.java
@@ -70,6 +70,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter;
* </p>
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has SimplifiedLRDProcessor
* @apiviz.has LOFProcessor
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/SimplifiedLRDProcessor.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/SimplifiedLRDProcessor.java
index 0ee9a862..c075c674 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/SimplifiedLRDProcessor.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/SimplifiedLRDProcessor.java
@@ -38,6 +38,7 @@ import de.lmu.ifi.dbs.elki.parallel.variables.SharedDouble;
* Note: we compute 1/lrd, the local reachability distance.
*
* @author Erich Schubert
+ * @since 0.7.0
*
* @apiviz.has Instance
*/