[mlpack-git] master: Minor style changes. (a9f5622)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Jun 21 20:31:13 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/bee9567e5c4c8ea688243744eb6aaaef1e850654...a9f5622c8a14409111f2d71bf5c0f8aaa8ad4ae1
>---------------------------------------------------------------
commit a9f5622c8a14409111f2d71bf5c0f8aaa8ad4ae1
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Jun 21 17:31:13 2016 -0700
Minor style changes.
>---------------------------------------------------------------
a9f5622c8a14409111f2d71bf5c0f8aaa8ad4ae1
src/mlpack/methods/lsh/lsh_main.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mlpack/methods/lsh/lsh_main.cpp b/src/mlpack/methods/lsh/lsh_main.cpp
index b436a15..c4d6ff6 100644
--- a/src/mlpack/methods/lsh/lsh_main.cpp
+++ b/src/mlpack/methods/lsh/lsh_main.cpp
@@ -191,20 +191,20 @@ int main(int argc, char *argv[])
Log::Info << "Neighbors computed." << endl;
// Compute recall, if desired.
- if (CLI::HasParam("t"))
+ if (CLI::HasParam("true_neighbors_file"))
{
- // read specified filename
const string trueNeighborsFile =
- CLI::GetParam<string>("true_neighbors_file");
+ CLI::GetParam<string>("true_neighbors_file");
- // load the data
+ // Load the true neighbors.
arma::Mat<size_t> trueNeighbors;
data::Load(trueNeighborsFile, trueNeighbors, true);
Log::Info << "Loaded true neighbor indices from '"
- << trueNeighborsFile << "'." << endl;
+ << trueNeighborsFile << "'." << endl;
- // Compute Recall and log
- double recallPercentage = 100 * allkann.ComputeRecall(neighbors, trueNeighbors);
+ // Compute recall and print it.
+ double recallPercentage = 100 * allkann.ComputeRecall(neighbors,
+ trueNeighbors);
Log::Info << "Recall: " << recallPercentage << endl;
}
More information about the mlpack-git
mailing list