X13ProcessingFactory extends GenericSaProcessingFactory implements IProcessingFactory<X13Specification, TsData, CompositeResults> { public static CompositeResults process(TsData s, X13Specification xspec, ProcessingContext context) { SequentialProcessing<TsData> processing = create(xspec, context); return processing.process(s); } protected  X13ProcessingFactory(); @Override SequentialProcessing<TsData> generateProcessing(X13Specification xspec, ProcessingContext context); SequentialProcessing<TsData> generateProcessing(X13Specification xspec); static CompositeResults process(TsData s, X13Specification xspec, ProcessingContext context); static CompositeResults process(TsData s, X13Specification xspec); @Override void dispose(); @Override AlgorithmDescriptor getInformation(); @Override boolean canHandle(IProcSpecification spec); @Override Map<String, Class> getSpecificationDictionary(Class<X13Specification> specClass); @Override Map<String, Class> getOutputDictionary(boolean compact); static final String METHOD; static final String VERSION; static final AlgorithmDescriptor DESCRIPTOR; static final String MSTATISTICS; static final X13ProcessingFactory instance; }
@Test public void testSpecific() { TsData ts = Data.X; X13Specification mySpec = X13Specification.RSA4.clone(); mySpec.getRegArimaSpecification().getRegression().setAICCDiff(2); mySpec.getX11Specification().setHendersonFilterLength(17); SeasonalFilterOption[] filters = new SeasonalFilterOption[ts.getFrequency().intValue()]; for (int i = 0; i < 2; ++i) { filters[i] = SeasonalFilterOption.S3X15; } for (int i = 2; i < filters.length; ++i) { filters[i] = SeasonalFilterOption.S3X5; } mySpec.getX11Specification().setSeasonalFilters(filters); mySpec.getBenchmarkingSpecification().setEnabled(true); CompositeResults rslts = X13ProcessingFactory.process(ts, mySpec); SingleTsData input = rslts.get(IProcDocument.INPUT, SingleTsData.class); assertTrue(input != null); TsData original = input.getSeries(); PreprocessingModel regarima = rslts.get(GenericSaProcessingFactory.PREPROCESSING, PreprocessingModel.class); assertTrue(regarima != null); TsData res = regarima.getFullResiduals(); X11Results x11 = rslts.get(X13ProcessingFactory.DECOMPOSITION, X11Results.class); Mstatistics mstats = rslts.get(X13ProcessingFactory.MSTATISTICS, Mstatistics.class); assertTrue(x11 != null); ISeriesDecomposition finalDecomposition = rslts.get(GenericSaProcessingFactory.FINAL, ISeriesDecomposition.class); assertTrue(finalDecomposition != null); SaBenchmarkingResults bench = rslts.get(GenericSaProcessingFactory.BENCHMARKING, SaBenchmarkingResults.class); assertTrue(bench != null); }
@Test public void simpleTest() { IProcResults rslts = X13ProcessingFactory.process(Data.X, X13Specification.RSA4); TsData sa = rslts.getData("sa", TsData.class); TsData fcasts = rslts.getData("y_f", TsData.class); TsData d8 = rslts.getData("decomposition.d-tables.d8", TsData.class); StatisticalTest lb=rslts.getData("residuals.lb", StatisticalTest.class); assertTrue(sa != null); assertTrue(fcasts != null); assertTrue(d8 != null); assertTrue(lb != null); }