Class ERiCNeighborPredicate.Instance

    • Constructor Summary

      Constructors 
      Constructor Description
      Instance​(elki.database.ids.DBIDs ids, elki.database.datastore.DataStore<elki.math.linearalgebra.pca.PCAFilteredResult> storage, elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean approximatelyLinearDependent​(elki.math.linearalgebra.pca.PCAFilteredResult p1, elki.math.linearalgebra.pca.PCAFilteredResult p2)
      Returns true, if the strong eigenvectors of the two specified PCAs span up the same space.
      int dimensionality​(elki.database.ids.DBIDRef id)
      Get the correlation dimensionality of a single object.
      elki.database.ids.DBIDs getNeighbors​(elki.database.ids.DBIDRef reference)
      Get the neighbors of a reference object for DBSCAN.
      elki.database.ids.DBIDIter iterDBIDs​(elki.database.ids.DBIDs neighbors)
      Add the neighbors to a DBID set
      boolean strongNeighbors​(elki.data.NumberVector v1, elki.data.NumberVector v2, elki.math.linearalgebra.pca.PCAFilteredResult pca1, elki.math.linearalgebra.pca.PCAFilteredResult pca2)
      Computes the distance between two given DatabaseObjects according to this distance function.
      boolean weakNeighbors​(double[] v1, double[] v2, elki.math.linearalgebra.pca.PCAFilteredResult pca1, elki.math.linearalgebra.pca.PCAFilteredResult pca2)
      Computes the distance between two given DatabaseObjects according to this distance function.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • relation

        private elki.database.relation.Relation<? extends elki.data.NumberVector> relation
        Vector data relation.
    • Constructor Detail

      • Instance

        public Instance​(elki.database.ids.DBIDs ids,
                        elki.database.datastore.DataStore<elki.math.linearalgebra.pca.PCAFilteredResult> storage,
                        elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
        Constructor.
        Parameters:
        ids - IDs this is defined for.
        storage - Stored models
    • Method Detail

      • getNeighbors

        public elki.database.ids.DBIDs getNeighbors​(elki.database.ids.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 elki.database.ids.DBIDIter iterDBIDs​(elki.database.ids.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​(elki.data.NumberVector v1,
                                       elki.data.NumberVector v2,
                                       elki.math.linearalgebra.pca.PCAFilteredResult pca1,
                                       elki.math.linearalgebra.pca.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 DatabaseObject
        v2 - second DatabaseObject
        pca1 - first PCA
        pca2 - second PCA
        Returns:
        true when the two vectors are close enough.
      • weakNeighbors

        public boolean weakNeighbors​(double[] v1,
                                     double[] v2,
                                     elki.math.linearalgebra.pca.PCAFilteredResult pca1,
                                     elki.math.linearalgebra.pca.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 DatabaseObject
        v2 - second DatabaseObject
        pca1 - first PCA
        pca2 - second PCA
        Returns:
        true when the two vectors are close enough.
      • approximatelyLinearDependent

        protected boolean approximatelyLinearDependent​(elki.math.linearalgebra.pca.PCAFilteredResult p1,
                                                       elki.math.linearalgebra.pca.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 PCA
        p2 - second PCA
        Returns:
        true, if the strong eigenvectors of the two specified PCAs span up the same space
      • dimensionality

        public int dimensionality​(elki.database.ids.DBIDRef id)
        Get the correlation dimensionality of a single object.
        Parameters:
        id - Object ID
        Returns:
        correlation dimensionality