Class CosineLocalitySensitiveHashFunction

  • All Implemented Interfaces:
    LocalitySensitiveHashFunction<elki.data.NumberVector>

    @Reference(authors="M. S. Charikar",
               title="Similarity estimation techniques from rounding algorithms",
               booktitle="Proc. 34th ACM Symposium on Theory of Computing, STOC\'02",
               url="https://doi.org/10.1145/509907.509965",
               bibkey="DBLP:conf/stoc/Charikar02")
    public class CosineLocalitySensitiveHashFunction
    extends java.lang.Object
    implements LocalitySensitiveHashFunction<elki.data.NumberVector>
    Random projection family to use with sparse vectors.

    Reference:

    M. S. Charikar
    Similarity estimation techniques from rounding algorithms
    Proc. 34th ACM Symposium on Theory of Computing, STOC'02

    Since:
    0.7.0
    Author:
    Evgeniy Faerman
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private elki.data.projection.random.RandomProjectionFamily.Projection projection
      Projection function.
    • Constructor Summary

      Constructors 
      Constructor Description
      CosineLocalitySensitiveHashFunction​(elki.data.projection.random.RandomProjectionFamily.Projection projection)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getNumberOfProjections()
      Get the number of projections performed.
      int hashObject​(elki.data.NumberVector obj)
      Compute the hash value of an object.
      int hashObject​(elki.data.NumberVector obj, double[] buf)
      Compute the hash value of an object (faster version).
      • Methods inherited from class java.lang.Object

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

      • projection

        private elki.data.projection.random.RandomProjectionFamily.Projection projection
        Projection function.
    • Constructor Detail

      • CosineLocalitySensitiveHashFunction

        public CosineLocalitySensitiveHashFunction​(elki.data.projection.random.RandomProjectionFamily.Projection projection)
        Constructor.
        Parameters:
        projection - Projection