use of com.axibase.tsd.api.model.series.query.transformation.forecast.SSASettings in project atsd-api-test by axibase.
the class PostEvaluationTest method testForecast.
@Test(description = "Interpolate and forecast evaluation-generated series.")
public void testForecast() {
Interpolate interpolationSettings = new Interpolate(InterpolateFunction.LINEAR, period(1));
Forecast forecastSettings = new Forecast().setHorizon(new Horizon().setLength(31)).setSsa(new SSASettings()).setInclude(Arrays.asList(SeriesType.HISTORY, SeriesType.FORECAST));
SeriesQuery query = baseQuery.withInterpolate(interpolationSettings).withForecast(forecastSettings).withTransformationOrder(Arrays.asList(EVALUATE, INTERPOLATE, FORECAST));
List<Series> seriesList = querySeriesAsList(query);
assertEquals(seriesList.size(), 2 * seriesCount);
CommonAssertions.assertSeriesSize(seriesList, 31);
query = query.withSeriesLimit(5).withLimit(4);
seriesList = querySeriesAsList(query);
assertEquals(seriesList.size(), 5);
CommonAssertions.assertSeriesSize(seriesList, 4);
}
Aggregations