TramoSeatsProcessor implements ISaProcessingFactory<TramoSeatsSpecification> { @Override public IProcessing<TsData, CompositeResults> generateProcessing(TramoSeatsSpecification specification, ProcessingContext context) { return TramoSeatsProcessingFactory.instance.generateProcessing(specification, context); } TramoSeatsProcessor(); @Override ISaSpecification createSpecification(InformationSet info); @Override ISaSpecification createSpecification(SaItem doc, TsDomain frozen, EstimationPolicyType policy, boolean nospan); @Override boolean updatePointSpecification(SaItem item); @Override SaDocument<?> createDocument(); @Override List<ISaSpecification> defaultSpecifications(); @Override void dispose(); @Override AlgorithmDescriptor getInformation(); @Override boolean canHandle(IProcSpecification spec); @Override IProcessing<TsData, CompositeResults> generateProcessing(TramoSeatsSpecification specification, ProcessingContext context); @Override Map<String, Class> getSpecificationDictionary(Class<TramoSeatsSpecification> specClass); @Override Map<String, Class> getOutputDictionary(boolean compact); static final AlgorithmDescriptor DESCRIPTOR; }
@Test public void testOutliers() { TramoSeatsSpecification xspec = TramoSeatsSpecification.RSA4.clone(); TsPeriodSelector sel = new TsPeriodSelector(); sel.excluding(0, 24); xspec.getTramoSpecification().getTransform().setSpan(sel); xspec.getTramoSpecification().getRegression().add(new OutlierDefinition(new Day(1993, Month.May, 0), "AO")); xspec.getTramoSpecification().getOutliers().setCriticalValue(3.5); TramoSeatsProcessor processor = new TramoSeatsProcessor(); CompositeResults rslt = processor.generateProcessing(xspec, null).process(Data.P); PreprocessingModel model = rslt.get("preprocessing", PreprocessingModel.class); assertTrue(model.description.getOutliers().size()>1); }