@Test
public void getRegressionStatisticsTest(){

	Row[] rows =
		new Row[] {
			Row.of(0.4, 0.5),
			Row.of(0.3, 0.5),
			Row.of(0.4, null),
			Row.of(0.2, 0.6),
			Row.of(0.6, 0.7),
			Row.of(0.1, 0.5)
		};
	RegressionMetricsSummary metricsSummary = getRegressionStatistics(Arrays.asList(rows));
	Assert.assertEquals(metricsSummary.total, 5);
	Assert.assertEquals(metricsSummary.ySumLocal, 1.6, 0.001);
	Assert.assertEquals(metricsSummary.ySum2Local, 0.66, 0.001);
	Assert.assertEquals(metricsSummary.predSumLocal, 2.8, 0.001);
	Assert.assertEquals(metricsSummary.predSum2Local, 1.599, 0.001);
	Assert.assertEquals(metricsSummary.sseLocal, 0.38, 0.001);
	Assert.assertEquals(metricsSummary.maeLocal, 1.2, 0.001);
	Assert.assertEquals(metricsSummary.mapeLocal, 7.083, 0.001);
}