mimno / Mallet

MALLET is a Java-based package for statistical natural language processing, document classification, clustering, topic modeling, information extraction, and other machine learning applications to text.
https://mimno.github.io/Mallet/
Other
980 stars 343 forks source link

Minkowski distance class is broken #3

Open thomasniebler opened 10 years ago

thomasniebler commented 10 years ago

The Minkowski distance class is severely broken. The distance method does only work for SparseVectors which have an equal number of nonzero values which mathematically doesn't make any sense. The euclideanDistance method almost always runs into an infinite loop.

htlin commented 10 years ago

Seems like ManhattenDistance's last line should return dist instead of diff.

mimno commented 10 years ago

Thanks, fixed.