Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Lsh table access #663
I modified Train() to accept an extra argument, a std::vector of projection tables (arma::mat). If the size of the vector and the tables it contains is correct, Train retrains the algorithm to use the specified projection tables.
The user can also call setProjectionTables() which simply calls Train().
The user can also see the projection tables by calling getProjectionTables()
added a commit
this pull request
May 31, 2016
It's ok, these are pretty simple so I think I can do them quickly tomorrow.
arma::cube slices are arranged the same way std::vector elements are in memory right? So it won't hurt performance to group tables like that - it would only hurt if they were arranged in some weird way so elements of each matrix weren't concentrated, but that wouldn't make sense.
But armadillo documentation says
so we're good
The boost serialization bit is fairly straightforward... we can use the version information with BOOST_CLASS_VERSION(). The implementation will probably look like this:
And then you will have to set the class version number which you would normally do with
I wonder why Travis is not building this PR anymore? If it compiles and the LSH tests pass on your system I am fine with that, no need for Travis.
The snippet you will need for versioning will be this...
It might be worth making a nice macro for this situation, or some class or something that is easy to overload.
Five patches for serialization:
You can download those then use
I pulled the changes from upstream:master and merged with my MultiprobeLSH branch, but there seems to be a problem when compiling mlpack_lsh.
g++ says all of the LSHSearch class variables have "not been declared in this scope". Not sure what this means, did I do something wrong when recompiling or is it something in the master branch code?
Here's the g++ error messages:
Yep, that was it, I only had template, I deleted the other one in the merge accidentaly.
By the way for some reason
produced an error but
didn't. The second version is how it is in the master branch.
Finally we can close this