@Test
public void nonRobustRegressionTest() {

	// Check results against a Python/Fortran test on noisy/trendy/sinusoidal data.
	double[] data = new double[144];
	for (int i = 0; i < data.length; ++i) {
		data[i] = fNonRobustNoisySinusoidResults[i][0];
	}
	SeasonalTrendLoess.Builder builder = new SeasonalTrendLoess.Builder().setPeriodLength(12).setSeasonalWidth(7);
	builder.setInnerIterations(2).setRobustnessIterations(0); // Should be the same as setNonRobust()
	SeasonalTrendLoess smoother = builder.buildSmoother(data);
	SeasonalTrendLoess.Decomposition stl = smoother.decompose();
	//dumpStlResultsToFile(data, stl, "/tmp/stl_non_robust_test.csv");
	double epsilon = 7.0e-11; // Doing absolute differences and some values > 10
	double[] trend = stl.getTrend();
	double[] seasonal = stl.getSeasonal();
	double[] residuals = stl.getResidual();
	double[] weights = stl.getWeights();
	for (int i = 0; i < data.length; ++i) {
		assertEquals(String.format("trend[%d]", i), fNonRobustNoisySinusoidResults[i][1], trend[i], epsilon);
		assertEquals(String.format("seasonal[%d]", i), fNonRobustNoisySinusoidResults[i][2], seasonal[i], epsilon);
		assertEquals(String.format("residuals[%d]", i), fNonRobustNoisySinusoidResults[i][3], residuals[i], epsilon);
		assertEquals(1.0, weights[i], 1.0e-13);
	}
}