public SrCnnEntireModeler(double threshold, double sensitivity, SrCnnDetectMode detectMode, int period, SrCnnDeseasonalityMode deseasonalityMode) { _threshold = threshold; _sensitivity = sensitivity; _detectMode = detectMode; _period = period; _predictArray = new double[_lookaheadWindowSize + 1]; switch (deseasonalityMode) { case SrCnnDeseasonalityMode.Stl: _deseasonalityFunction = new StlDeseasonality(); break; case SrCnnDeseasonalityMode.Mean: _deseasonalityFunction = new MeanDeseasonality(); break; default: Contracts.Assert(deseasonalityMode == SrCnnDeseasonalityMode.Median); _deseasonalityFunction = new MedianDeseasonality(); break; } }
public StlDeseasonality() { _stl = new InnerStl(true); _backupFunc = new MedianDeseasonality(); }