Skip to content

Commit

Permalink
changing test config
Browse files Browse the repository at this point in the history
  • Loading branch information
nikit-srivastava committed Oct 19, 2018
1 parent 2d4ba0b commit 62137dd
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import org.aksw.word2vecrestful.utils.Cfg;
import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelBruteForce;
import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelKMeans;
import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelBinSrch;
import org.aksw.word2vecrestful.word2vec.Word2VecFactory;
import org.aksw.word2vecrestful.word2vec.Word2VecModel;
import org.apache.log4j.LogManager;
Expand Down Expand Up @@ -38,12 +38,12 @@ public void testNbmTime() throws IOException {
LOG.info("Starting BruteForce-Model Test");
List<String> correctWords = getCorrectWords(centroids, nbm);
LOG.info("Correct Words are :" + correctWords);
LOG.info("Initializing W2VNrmlMemModelKMeans Model");
final W2VNrmlMemModelKMeans memModel = new W2VNrmlMemModelKMeans(nbm.word2vec, nbm.vectorSize);
LOG.info("Initializing W2VNrmlMemModelBinSrch Model");
final W2VNrmlMemModelBinSrch memModel = new W2VNrmlMemModelBinSrch(nbm.word2vec, nbm.vectorSize);
memModel.process();
List<String> lrModelWords = new ArrayList<>();

LOG.info("Starting W2VNrmlMemModelKMeans Test");
LOG.info("Starting W2VNrmlMemModelBinSrch Test");

for (int i = 0; i < centroids.length; i++) {
LOG.info("Sending query for Centroid " + (i + 1));
Expand All @@ -53,7 +53,7 @@ public void testNbmTime() throws IOException {
totTime += diff;
LOG.info("Query time recorded for Centroid " + (i + 1) + " is " + diff + " milliseconds.");
}
LOG.info("Average query time for W2VNrmlMemModelKMeans is : " + (totTime / centroids.length) + " milliseconds");
LOG.info("Average query time for W2VNrmlMemModelBinSrch is : " + (totTime / centroids.length) + " milliseconds");
LOG.info("Predicted Words are :" + lrModelWords);
float percVal = calcPercScore(correctWords, lrModelWords);
LOG.info("Score for Test is : " + percVal + "%");
Expand Down

0 comments on commit 62137dd

Please sign in to comment.