3 ms·
I have used KL-divergence in authorship verification: https://github.com/capjamesg/pysurprisal/blob/main/pysurprisal/core.py#L5 https://github.com/capjamesg/pys
by zerojames 3y ago
I have used KL-divergence in authorship verification: https://github.com/capjamesg/pysurprisal/blob/main/pysurprisal/core.py#L5 https://github.com/capjamesg/pysurprisal/blob/main/pysurpris...
My theory was: calculate entropy ("surprisal") of used words in a language (in my case, from an NYT corpus), then calculate KL-divergence between a given prose and a collection of surprisals for different authors. The author to whom the prose had the highest KL-divergence was assumed to be the author. I think it has been used in stylometry a bit.
- versteegen 3y ago*lowest KL-divergence
- zerojames 3y agoYes indeed -- thank you! :facepalm: