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 doubleepsilonThe epsilon distance a neighbor may have at most.private doubleepsilonsqThe epsilon distance a neighbor may have at most.private java.util.RandomrandThe random generator to draw the samples with.private Relation<? extends UncertainObject>relationThe relation holding the uncertain objects.private intsampleSizeThe size of samplesets that should be drawn for neighborcheck.private doublethresholdThe 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 booleancheckSamples(UncertainObject o1, UncertainObject o2)DBIDsgetIDs()Get the IDs the predicate is defined for.DBIDsgetNeighbors(DBIDRef reference)Get the neighbors of a reference object for DBSCAN.DBIDIteriterDBIDs(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.InstanceGet the neighbors of a reference object for DBSCAN.- Specified by:
getNeighborsin 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.InstanceGet the IDs the predicate is defined for.- Specified by:
getIDsin interfaceNeighborPredicate.Instance<DBIDs>- Returns:
- Database ids
-
iterDBIDs
public DBIDIter iterDBIDs(DBIDs neighbors)
Description copied from interface:NeighborPredicate.InstanceAdd the neighbors to a DBID set- Specified by:
iterDBIDsin interfaceNeighborPredicate.Instance<DBIDs>- Parameters:
neighbors- Neighbors to iterate over- Returns:
- iterator
-
-