Skip to content

Commit

Permalink
config change
Browse files Browse the repository at this point in the history
  • Loading branch information
nikit-srivastava committed Oct 18, 2018
1 parent c5dbeb2 commit b9bffd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class W2VNrmlMemModelKMeans implements GenWord2VecModel {
private String[] wordArr;
private float[][] vecArr;
private int compareVecCount = 100;
private int bucketCount = 10;
private int bucketCount = 20;
private int kMeansMaxItr = 5;
private BitSet[][] csBucketContainer;
private String vecFilePath = "data/kmeans/comparison-vecs.csv";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,6 @@ public void testNbmTime() throws IOException {
float percVal = NrmlzdMdlPrfmncTester.calcPercScore(correctWords, lrModelWords);
LOG.info("Score for Test is : " + percVal + "%");
lrModelWords.clear();

String word1 = "By_Jonas_Elmerraji";
String word2 = "%_#F########_3v.jsn";
float[] word1Vec = nbm.word2vec.get("By_Jonas_Elmerraji");
float[] word2Vec = nbm.word2vec.get("%_#F########_3v.jsn");
LOG.info("Cosine Similarity between " + word1 + " & " + word2 + " is : "
+ Word2VecMath.cosineSimilarity(word1Vec, word2Vec));
LOG.info("Cosine Similarity between " + word1 + " & Centroid19 is : "
+ Word2VecMath.cosineSimilarity(TestConst.CENT19, word1Vec));
LOG.info("Cosine Similarity between " + word2 + " & Centroid19 is : "
+ Word2VecMath.cosineSimilarity(TestConst.CENT19, word2Vec));
}

private static float[][] fetchWordsVec(String[] words, Word2VecModel nbm) {
Expand Down

0 comments on commit b9bffd8

Please sign in to comment.