Code Monkey home page Code Monkey logo

tarsoslsh's People

Contributors

jorensix avatar joyouskoala avatar maxbrito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tarsoslsh's Issues

The DistanceMeasure for l1 and l2 should be swapped.

In CommandLineInterface.java

if(radius == 0 && hashFamilyType.equalsIgnoreCase("l1")){
    measure = new EuclideanDistance();
    radius = LSH.determineRadius(dataset, measure, timeout);
} else if (radius == 0 && hashFamilyType.equalsIgnoreCase("l2")){
    measure = new CityBlockDistance();
    radius = LSH.determineRadius(dataset, measure, timeout);
}

The position of EuclideanDistance and CityBlockDistance should be swapped?

how to "Drop me a Line"?

I use this lib in my homework for Image and Audio Search ,Thank U very much.
“Drop me a line if you use TarsosLSH in your project. Always nice to hear how this software is used.” but I do not know how to do it .I have to write it here.
By the way, I think as a lib, some class lost some method .
For example:
I add "public Vector(String key,double[] double){}" to create a vector immediately(this is very important , I think)
I add some method to get dataset from memory instead of disk file, like:
“public LSH createIndex(double radius,String hashFamilyType,int numberOfHashes,int numberOfHashTables,int numberOfNeighbours,List dataset){}” for more convenient.

How to use LSH in Hamming

As a naive learner I want to ask a naive question that how to use LSH in Hamming. I have tried use BinLSH, however it can not run successfully, the format is as below and the dataset is your test dataset.

String[] test = new String[]{"-d","D:/TarsosLSH/build/dataset.txt","-q","D:/TarsosLSH/build/queries.txt"};
BinCommandLineInterface cli = new BinCommandLineInterface(test);

the problem is:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Could you tell me how to solve this problem? I will be appreciated it if you give me the answer as soon as possible.Thank you.

Calculation of CityBlockHash

In families/CityBlockHash.java, you calculate the hash with the following code (line 51):

hash[d] = (int) (vector.get(d)-randomPartition.get(d) / Double.valueOf(w));

I could be wrong here, but would you want parenthesis around the numerator? Otherwise order of operations takes precedence, which I'm not sure is correct.

Thanks. I'd be happy to put in a pull request for you, if need be.

EuclideanDistance doesn't seem to work correctly

The command line runner help is incorrect regarding EuclideanDistance:

if(radius == 0 && hashFamilyType.equalsIgnoreCase("l1")){
  measure = new CityBlockDistance(); 
  ...
} else if (radius == 0 && hashFamilyType.equalsIgnoreCase("l2")){
  measure = new CityBlockDistance();
  ...
}

CityBlockDistance is used for both L1 and L2

GC overhead limit exceeded

Even after using 13g of memory I get "GC overhead limit exceeded" exception with following stack trace:
Picked up _JAVA_OPTIONS: -Xms2g -Xmx13g -Xss100M -XX:MaxPermSize=3g
Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.(String.java:203)
at java.lang.String.substring(String.java:1913)
at java.lang.String.split(String.java:2288)
at java.lang.String.split(String.java:2355)
at be.tarsos.lsh.util.FileUtils.readCSVFile(Unknown Source)
at be.tarsos.lsh.LSH.readDataset(Unknown Source)
at be.tarsos.lsh.CommandLineInterface.parseArguments(Unknown Source)
at be.tarsos.lsh.LSH.main(Unknown Source)

My dataset size is 4GB, it contains 15201 vectors. I run with following options "java -jar TarsosLSH-0.7.jar -f l2 -h 8 -t 32 -n 15 -d tfVectorFor105G -q tfVectorQueriesOn105g"

How to use TarsosLSH for text documents

I would like search for similar text documents using TarsosLSH. Maybe you could suggest some techniques, how to transform text to vector, suitable for this library?

Thank you!

Dealing with missing data

I am contemplating using LSH in my application, but I am unsure how to deal with absent/missing data in a vector. The nearest neighbor imputation implies that this type of algorithm deals with this scenario, but how would I go about implementing it?

Is it as simple as not calling "set" for that dimension?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.