wang2vec: treat activations as probabilities and compute p(union) accordingly
diff --git a/word2vecExt.c b/word2vecExt.c
index 1cfff99..6aec264 100644
--- a/word2vecExt.c
+++ b/word2vecExt.c
@@ -1619,7 +1619,7 @@
max_f = f;
max_target = target;
}
- target_sums[target]+=f;
+ target_sums[target] += (1-target_sums[target]) * f;
}
printf("%s (%.2f) ", vocab[max_target].word, max_f);
if(max_f > maxmax_f) {
@@ -1638,7 +1638,7 @@
}
}
printf(" – max sum: %s (%.2f), max resp.: \x1b[1m%s\x1b[0m (%.2f)\n",
- vocab[max_target].word, max_f/window/2,
+ vocab[max_target].word, max_f,
vocab[maxmax_target].word, maxmax_f);
}
}