assertEquals(-0.707107, zScore.getTransformedValue(new GenericPreference(1, 1, -2.0f)), EPSILON);
}
public void testExample() throws Exception {
DataModel dataModel = getDataModel(new long[] {1}, new Double[][] {{5.0, 7.0, 9.0}});
PreferenceTransform zScore = new ZScore(dataModel);
assertEquals(-1.0, zScore.getTransformedValue(new GenericPreference(1, 0, 5.0f)), EPSILON);
assertEquals(0.0, zScore.getTransformedValue(new GenericPreference(1, 1, 7.0f)), EPSILON);
assertEquals(1.0, zScore.getTransformedValue(new GenericPreference(1, 2, 9.0f)), EPSILON);
}