Giter VIP home page Giter VIP logo

Comments (6)

zoq avatar zoq commented on June 23, 2024

Can you check that the datasets folder isn't empty? If that's the case there are three options:

  1. You could download the datasets repository using: 'git submodule update --init'. Sometimes this dosn't work, because bitbucket dosn't work well with huge datasets.
  2. Download the dataset repository as zip: https://bitbucket.org/zoqbits/benchmark-data/get/1f7770e39c61.zip
  3. Manually download the datasets you need: https://bitbucket.org/zoqbits/benchmark-data/src

from benchmarks.

mindisk avatar mindisk commented on June 23, 2024

Oh,yes, it was empty. I didn't even realized it. I downloaded the datasets and ran the benchmark again and now I do not have the No conversion possible. However, I still get the following error on all datasets that are used for benchmarking LSH
[FATAL] Could not execute command: ['mlpack_lsh', '-r', 'datasets/wine.csv', '-v', '-k', '3', '-s', '42']
Any ideas how to resolve it?

from benchmarks.

zoq avatar zoq commented on June 23, 2024

Ah, I guess since mlpack changed the names from lsh to mlpack_lsh the auto detection doesn't work anymore. I'll go and fix this in the next days. However you can manually specify the mlpack binary path using the MLPACK_BIN parameter:

make MLPACK_BIN=/usr/local/bin/ run

from benchmarks.

mindisk avatar mindisk commented on June 23, 2024

After running make MLPACK_BIN=/usr/local/bin/ run BLOCK=mlpack METHODBLOCK=LSH command, I get similar error:

[FATAL] Could not execute command: ['/usr/local/bin/mlpack_lsh', '-r','datasets/wine.csv', '-v', '-k', '3', '-s', '42']

Now, I've ran the mlpack_lsh manually with the same parameters as the benchmark script: mlpack_lsh -r datasets/wine.csv -d distances.csv -n neighbours.csv -v -k 5 -s 42. It seems that I am missing to provide the query file

[DEBUG] Compiled with debugging symbols.
[FATAL] Both --query_file and --k must be specified if search is to be done!
terminate called after throwing an instance of 'std::runtime_error'
  what():  fatal error; see Log::Fatal output
Aborted (core dumped)

So, if I create a query_file where I specify at least one query point and then it executes without trouble
mlpack_lsh -r datasets/wine.csv -d distances.csv -n neighbours.csv -q datasets/wines_query_point.csv -v -k 5 -s 42

[DEBUG] Compiled with debugging symbols.
[INFO ] Using LSH with 10 projections (K) and 30 tables (L) with default hash width.
[INFO ] Loading 'datasets/wine.csv' as CSV data.  Size is 13 x 178.
[INFO ] Loaded reference data from 'datasets/wine.csv' (13 x 178).
[INFO ] Hash width chosen as: 19.4285
[INFO ] Final hash table size: (5051 x 4)
[INFO ] Computing 5 distance approximate nearest neighbors.
[INFO ] Loading 'datasets/wines_query_point.csv' as CSV data.  Size is 13 x 1.
[INFO ] Loaded query data from 'datasets/wines_query_point.csv' (13 x 1).
[INFO ] 1 distinct indices returned on average.
[INFO ] Neighbors computed.
[INFO ] Saving CSV data to 'distances.csv'.
[INFO ] Saving CSV data to 'neighbours.csv'.
[INFO ] 
[INFO ] Execution parameters:
[INFO ]   bucket_size: 500
[INFO ]   distances_file: distances.csv
[INFO ]   hash_width: 0
[INFO ]   help: false
[INFO ]   info: ""
[INFO ]   input_model_file: ""
[INFO ]   k: 5
[INFO ]   neighbors_file: neighbours.csv
[INFO ]   output_model_file: ""
[INFO ]   projections: 10
[INFO ]   query_file: datasets/wines_query_point.csv
[INFO ]   reference_file: datasets/wine.csv
[INFO ]   second_hash_size: 99901
[INFO ]   seed: 42
[INFO ]   tables: 30
[INFO ]   verbose: true
[INFO ]   version: false
[INFO ] 
[INFO ] Program timers:
[INFO ]   computing_neighbors: 0.000079s
[INFO ]   hash_building: 0.143197s
[INFO ]   loading_data: 0.001300s
[INFO ]   saving_data: 0.000163s
[INFO ]   total_time: 0.146325s

So the question is, does the benchmark script provides a query point file for the mlpack_lsh? It seems, it doesn't, can this be the issue?

from benchmarks.

zoq avatar zoq commented on June 23, 2024

Sorry for the slow response. You are right in the latest version you have to specify a query set. Which shouldn't be the case:

"You may specify a separate set of reference points and query points, or just a reference set which will be used as both the reference and query set."

I'll will fix that in mlpack in the next days. What you could do in the meantime is to modify the mlpack lsh.py script.

instead of using:

cmd = shlex.split(self.path + "mlpack_lsh -r " + self.dataset + " -v " + options)

we could write:

cmd = shlex.split(self.path + "mlpack_lsh -r " + self.dataset + " -q " + self.dataset + " -v " + options)

from benchmarks.

zoq avatar zoq commented on June 23, 2024

Fixed upstream in mlpack/mlpack@5bc514c#diff-1d8fe56c303ed01b74921339d84b2d3c

from benchmarks.

Related Issues (20)

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.