Added some stats functions implementing distance and similarity measures commonly used with LDA.