@Reference(authors="E. Schubert, A. Zimek, H.-P. Kriegel", title="Fast and Scalable Outlier Detection with Approximate Nearest Neighbor Ensembles", booktitle="Proc. 20th International Conference on Database Systems for Advanced Applications (DASFAA)", url="http://dx.doi.org/10.1007/978-3-319-18123-3_2") public class SpacefillingKNNPreprocessor<O extends NumberVector> extends AbstractIndex<O> implements KNNIndex<O>
SpacefillingMaterializeKNNPreprocessor
, but will also
be slower.
Reference:
E. Schubert, A. Zimek, H.-P. Kriegel
Fast and Scalable Outlier Detection with Approximate Nearest Neighbor
Ensembles
Proc. 20th International Conference on Database Systems for Advanced
Applications (DASFAA), Hanoi, Vietnam, 2015.
Modifier and Type | Class and Description |
---|---|
static class |
SpacefillingKNNPreprocessor.Factory<V extends NumberVector>
Index factory class
|
protected class |
SpacefillingKNNPreprocessor.SpaceFillingKNNQuery
KNN Query processor for space filling curves
|
Modifier and Type | Field and Description |
---|---|
(package private) List<SpatialSorter> |
curvegen
Spatial curve generators
|
(package private) List<List<SpatialPair<DBID,NumberVector>>> |
curves
Curve storage
|
private static Logging |
LOG
Class logger
|
(package private) Mean |
mean
Mean number of distance computations
|
(package private) int |
odim
Number of dimensions to use.
|
(package private) WritableDataStore<int[]> |
positions
Curve position storage
|
(package private) RandomProjectionFamily |
proj
Random projection family to use.
|
(package private) Random |
random
Random number generator.
|
(package private) int |
variants
Number of variants to generate for each curve
|
(package private) double |
window
Curve window size
|
relation
Constructor and Description |
---|
SpacefillingKNNPreprocessor(Relation<O> relation,
List<SpatialSorter> curvegen,
double window,
int variants,
int odim,
RandomProjectionFamily proj,
Random random)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
KNNQuery<O> |
getKNNQuery(DistanceQuery<O> distanceQuery,
Object... hints)
Get a KNN query object for the given distance query and k.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
void |
initialize()
Initialize the index.
|
void |
logStatistics()
Send statistics to the logger, if enabled.
|
protected void |
preprocess() |
static int[] |
randomPermutation(int[] out,
Random random)
Perform a random permutation of the array, in-place.
|
static int[] |
range(int start,
int end)
Initialize an integer value range.
|
private static final Logging LOG
final List<SpatialSorter> curvegen
final double window
final int variants
List<List<SpatialPair<DBID,NumberVector>>> curves
WritableDataStore<int[]> positions
Mean mean
final int odim
RandomProjectionFamily proj
Random random
public SpacefillingKNNPreprocessor(Relation<O> relation, List<SpatialSorter> curvegen, double window, int variants, int odim, RandomProjectionFamily proj, Random random)
relation
- Relation to index.curvegen
- Curve generatorswindow
- Window multiplicatorvariants
- Number of curve variants to generateodim
- Number of dimensions to use -1 == all.random
- Random number generatorpublic void initialize()
Index
initialize
in interface Index
protected void preprocess()
public static int[] range(int start, int end)
start
- Starting valueend
- End value (exclusive)public static int[] randomPermutation(int[] out, Random random)
out
- Prefilled output array.random
- Random generator.public String getLongName()
Result
getLongName
in interface Result
getLongName
in class AbstractIndex<O extends NumberVector>
public String getShortName()
Result
getShortName
in interface Result
getShortName
in class AbstractIndex<O extends NumberVector>
public void logStatistics()
Index
logStatistics
in interface Index
public KNNQuery<O> getKNNQuery(DistanceQuery<O> distanceQuery, Object... hints)
KNNIndex
getKNNQuery
in interface KNNIndex<O extends NumberVector>
distanceQuery
- Distance queryhints
- Hints for the optimizernull
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.