Package elki.clustering.uncertain
Class FDBSCANNeighborPredicate.Instance
- java.lang.Object
-
- elki.clustering.uncertain.FDBSCANNeighborPredicate.Instance
-
- All Implemented Interfaces:
NeighborPredicate.Instance<DBIDs>
- Enclosing class:
- FDBSCANNeighborPredicate
public static class FDBSCANNeighborPredicate.Instance extends java.lang.Object implements NeighborPredicate.Instance<DBIDs>
Instance of the neighbor predicate.- Author:
- Alexander Koos, Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private double
epsilon
The epsilon distance a neighbor may have at most.private double
epsilonsq
The epsilon distance a neighbor may have at most.private java.util.Random
rand
The random generator to draw the samples with.private Relation<? extends UncertainObject>
relation
The relation holding the uncertain objects.private int
sampleSize
The size of samplesets that should be drawn for neighborcheck.private double
threshold
The relative amount of epsilon-close pairings determined by the neighborcheck.
-
Constructor Summary
Constructors Constructor Description Instance(double epsilon, int sampleSize, double threshold, Relation<? extends UncertainObject> relation, RandomFactory rand)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
checkSamples(UncertainObject o1, UncertainObject o2)
DBIDs
getIDs()
Get the IDs the predicate is defined for.DBIDs
getNeighbors(DBIDRef reference)
Get the neighbors of a reference object for DBSCAN.DBIDIter
iterDBIDs(DBIDs neighbors)
Add the neighbors to a DBID set
-
-
-
Field Detail
-
epsilon
private double epsilon
The epsilon distance a neighbor may have at most.
-
epsilonsq
private double epsilonsq
The epsilon distance a neighbor may have at most.
-
sampleSize
private int sampleSize
The size of samplesets that should be drawn for neighborcheck.
-
threshold
private double threshold
The relative amount of epsilon-close pairings determined by the neighborcheck.
-
relation
private Relation<? extends UncertainObject> relation
The relation holding the uncertain objects.
-
rand
private java.util.Random rand
The random generator to draw the samples with.
-
-
Constructor Detail
-
Instance
public Instance(double epsilon, int sampleSize, double threshold, Relation<? extends UncertainObject> relation, RandomFactory rand)
Constructor.- Parameters:
epsilon
- Maximum distancesampleSize
- Sampling sizethreshold
- Threshold on how many samples are within the radiusrelation
- Data relationrand
- Random generator for sampling
-
-
Method Detail
-
getNeighbors
public DBIDs getNeighbors(DBIDRef reference)
Description copied from interface:NeighborPredicate.Instance
Get the neighbors of a reference object for DBSCAN.- Specified by:
getNeighbors
in interfaceNeighborPredicate.Instance<DBIDs>
- Parameters:
reference
- Reference object- Returns:
- Neighborhood
-
checkSamples
private boolean checkSamples(UncertainObject o1, UncertainObject o2)
-
getIDs
public DBIDs getIDs()
Description copied from interface:NeighborPredicate.Instance
Get the IDs the predicate is defined for.- Specified by:
getIDs
in interfaceNeighborPredicate.Instance<DBIDs>
- Returns:
- Database ids
-
iterDBIDs
public DBIDIter iterDBIDs(DBIDs neighbors)
Description copied from interface:NeighborPredicate.Instance
Add the neighbors to a DBID set- Specified by:
iterDBIDs
in interfaceNeighborPredicate.Instance<DBIDs>
- Parameters:
neighbors
- Neighbors to iterate over- Returns:
- iterator
-
-