joseamuniz/mark — Issue #2: CorrelationDistance can return non-negative distances
Author: joseamuniz
Created: 2011-11-14 02:42:56+00:00
State: open

With gryffindor-sliderin.csv, add the following assertion to CorrelationDistance's apply method:

if (1.1 - abs(correlation(gradesList)) < 0 )
throw new RuntimeException("Computed negative distance") ;

The distance between Hagrid and Snape is negative due to a strong negative correlation of -1.53.