FALCONN icon indicating copy to clipboard operation
FALCONN copied to clipboard

LSH Implementation with TFIDF Dense Matrix

Open girishmt4 opened this issue 7 years ago • 5 comments
trafficstars

I am currently working on Documents similarity project. We are processing text documents to generate TFIDF Vectors for each document in the corpus. In a nutshell, we are working with DENSE DATA with the documents being the data points and TFIDF values of the terms occuring in the document as their features. We succeeded in implementing LSH with sparse data but it's not quite efficient. Is it possible to use FALCONN with dense data for LSH implementation?

girishmt4 avatar Apr 24 '18 12:04 girishmt4

Yes, FALCONN supports dense data. In fact, the support for dense data is better than for sparse data. But if your data is very high-dimensional, the dense approach might not be efficient. What dimension do you work with?

ludwigschmidt avatar Apr 25 '18 01:04 ludwigschmidt

I am currently working with a dataset that stores the TF-IDF values for only those terms that occur in the particular document. So, every point will have different dimension. What is your say on this?

girishmt4 avatar Apr 25 '18 21:04 girishmt4

In that case, using a sparse representation might be better.

ludwigschmidt avatar Apr 26 '18 03:04 ludwigschmidt

can you explain the reason behind that? I am still wondering why sparse representation can perform better than the dense one!

girishmt4 avatar Apr 26 '18 04:04 girishmt4

With a dense representation, the code will be performing many unnecessary multiplications with zero.

ludwigschmidt avatar Apr 26 '18 19:04 ludwigschmidt