From 5e04aacc19057a76520389b3469fe46961501b9a Mon Sep 17 00:00:00 2001 From: "nikit91@gmail.com" Date: Wed, 10 Oct 2018 13:06:40 +0200 Subject: [PATCH] switching model in test --- .../word2vecrestful/NrmlzdThetaMdlPrfmncTester.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/aksw/word2vecrestful/NrmlzdThetaMdlPrfmncTester.java b/src/test/java/org/aksw/word2vecrestful/NrmlzdThetaMdlPrfmncTester.java index 270aa69..318022a 100644 --- a/src/test/java/org/aksw/word2vecrestful/NrmlzdThetaMdlPrfmncTester.java +++ b/src/test/java/org/aksw/word2vecrestful/NrmlzdThetaMdlPrfmncTester.java @@ -5,7 +5,7 @@ import java.util.List; import org.aksw.word2vecrestful.utils.Cfg; -import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelBinSrch; +import org.aksw.word2vecrestful.word2vec.W2VNrmlMemModelKMeans; import org.aksw.word2vecrestful.word2vec.Word2VecFactory; import org.aksw.word2vecrestful.word2vec.Word2VecModel; import org.apache.log4j.LogManager; @@ -67,11 +67,11 @@ public void testNbmTime() throws IOException { LOG.info("Starting BruteForce-Model Test"); List correctWords = NrmlzdMdlPrfmncTester.getCorrectWords(centroids, nbm); LOG.info("Correct Words are :" + correctWords); - LOG.info("Initializing W2VNrmlMemModelBinSrch Model"); - final W2VNrmlMemModelBinSrch memModel = new W2VNrmlMemModelBinSrch(nbm.word2vec, nbm.vectorSize); + LOG.info("Initializing W2VNrmlMemModelKMeans Model"); + final W2VNrmlMemModelKMeans memModel = new W2VNrmlMemModelKMeans(nbm.word2vec, nbm.vectorSize); List lrModelWords = new ArrayList<>(); - LOG.info("Starting W2VNrmlMemModelBinSrch Test"); + LOG.info("Starting W2VNrmlMemModelKMeans Test"); for (int i = 0; i < centroids.length; i++) { LOG.info("Sending query for Centroid " + (i + 1)); @@ -82,7 +82,7 @@ public void testNbmTime() throws IOException { LOG.info("Query time recorded for Centroid " + (i + 1) + " is " + diff + " milliseconds."); } LOG.info( - "Average query time for W2VNrmlMemModelBinSrch is : " + (totTime / centroids.length) + " milliseconds"); + "Average query time for W2VNrmlMemModelKMeans is : " + (totTime / centroids.length) + " milliseconds"); LOG.info("Predicted Words are :" + lrModelWords); float percVal = NrmlzdMdlPrfmncTester.calcPercScore(correctWords, lrModelWords); LOG.info("Score for Test is : " + percVal + "%");