double correlation = new PearsonCorrelationSimilarity(dataModel).userSimilarity(user1, user2);
assertCorrelationEquals(0.9607689228305227, correlation);
}
public void testSimpleWeighted() throws Exception {
User user1 = getUser("test1", 1.0, 2.0, 3.0);
User user2 = getUser("test2", 2.0, 5.0, 6.0);
DataModel dataModel = getDataModel(user1, user2);
double correlation = new PearsonCorrelationSimilarity(dataModel, Weighting.WEIGHTED).userSimilarity(user1, user2);
assertCorrelationEquals(0.9901922307076306, correlation);
}