Class ERiCNeighborPredicate.Instance
- java.lang.Object
-
- elki.clustering.dbscan.predicates.AbstractRangeQueryNeighborPredicate.Instance<DBIDs,PCAFilteredResult>
-
- elki.clustering.dbscan.predicates.ERiCNeighborPredicate.Instance
-
- All Implemented Interfaces:
NeighborPredicate.Instance<DBIDs>
- Enclosing class:
- ERiCNeighborPredicate
public class ERiCNeighborPredicate.Instance extends AbstractRangeQueryNeighborPredicate.Instance<DBIDs,PCAFilteredResult>
Instance for a particular data set.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private Relation<? extends NumberVector>
relation
Vector data relation.-
Fields inherited from class elki.clustering.dbscan.predicates.AbstractRangeQueryNeighborPredicate.Instance
ids, storage
-
-
Constructor Summary
Constructors Constructor Description Instance(DBIDs ids, DataStore<PCAFilteredResult> storage, Relation<? extends NumberVector> relation)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
approximatelyLinearDependent(PCAFilteredResult p1, PCAFilteredResult p2)
Returns true, if the strong eigenvectors of the two specified PCAs span up the same space.int
dimensionality(DBIDRef id)
Get the correlation dimensionality of a single object.DBIDs
getNeighbors(DBIDRef reference)
Get the neighbors of a reference object for DBSCAN.DBIDIter
iterDBIDs(DBIDs neighbors)
Add the neighbors to a DBID setboolean
strongNeighbors(NumberVector v1, NumberVector v2, PCAFilteredResult pca1, PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this distance function.boolean
weakNeighbors(double[] v1, double[] v2, PCAFilteredResult pca1, PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this distance function.-
Methods inherited from class elki.clustering.dbscan.predicates.AbstractRangeQueryNeighborPredicate.Instance
getIDs
-
-
-
-
Field Detail
-
relation
private Relation<? extends NumberVector> relation
Vector data relation.
-
-
Constructor Detail
-
Instance
public Instance(DBIDs ids, DataStore<PCAFilteredResult> storage, Relation<? extends NumberVector> relation)
Constructor.- Parameters:
ids
- IDs this is defined for.storage
- Stored models
-
-
Method Detail
-
getNeighbors
public DBIDs getNeighbors(DBIDRef reference)
Description copied from interface:NeighborPredicate.Instance
Get the neighbors of a reference object for DBSCAN.- Parameters:
reference
- Reference object- Returns:
- Neighborhood
-
iterDBIDs
public DBIDIter iterDBIDs(DBIDs neighbors)
Description copied from interface:NeighborPredicate.Instance
Add the neighbors to a DBID set- Parameters:
neighbors
- Neighbors to iterate over- Returns:
- iterator
-
strongNeighbors
public boolean strongNeighbors(NumberVector v1, NumberVector v2, PCAFilteredResult pca1, PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this distance function. Note, that the first PCA must have equal or more strong eigenvectors than the second PCA.- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObjectpca1
- first PCApca2
- second PCA- Returns:
true
when the two vectors are close enough.
-
weakNeighbors
public boolean weakNeighbors(double[] v1, double[] v2, PCAFilteredResult pca1, PCAFilteredResult pca2)
Computes the distance between two given DatabaseObjects according to this distance function. Note, that the first PCA must have equal or more strong eigenvectors than the second PCA.- Parameters:
v1
- first DatabaseObjectv2
- second DatabaseObjectpca1
- first PCApca2
- second PCA- Returns:
true
when the two vectors are close enough.
-
approximatelyLinearDependent
protected boolean approximatelyLinearDependent(PCAFilteredResult p1, PCAFilteredResult p2)
Returns true, if the strong eigenvectors of the two specified PCAs span up the same space. Note, that the first PCA must have at least as many strong eigenvectors than the second PCA.- Parameters:
p1
- first PCAp2
- second PCA- Returns:
- true, if the strong eigenvectors of the two specified PCAs span up the same space
-
dimensionality
public int dimensionality(DBIDRef id)
Get the correlation dimensionality of a single object.- Parameters:
id
- Object ID- Returns:
- correlation dimensionality
-
-