#ifndef TRANSFORMATION_H #define TRANSFORMATION_H #include using namespace std; class Transformation { private: vector SeasonalIndex; double GeometricAverage; double valueMean; double valueSd; int tsSizeValue; public: vector TimeSeries; double INFINITY; Transformation(vector); ~Transformation(); // период сезонности для использования в Deseasonalization int seasonalPeriod; // параметр трансформации double lambda; // параметр сдвига значений вектора при наличии в нем отрицательных значений double tsShiftValue; // обрабатываемый временной ряд void setTimeSeries(vector); int sign(double); // auto lambda estimation void lambdaEstimation(); //Guerrero(1993) //Time-series analysis supported by Power Transformations double lambdaEstimationGuerrero(double); //Box-Cox(1964) vector BoxCox(); vector invBoxCox(); //Manly(1976) // -- Negative y’s could be allowed // -- The transformation was reported to be successful in transform // unimodal skewed distribution into normal distribution, but is // not quite useful for bimodal or U - shaped distribution vector ExponentialTransformation(); vector invExponentialTransformation(); //John and Draper(1980) // -- Negative y’s could be allowed. // -- It works best at those distribution that is somewhat symmetric. // A power transformation on a symmetric distribution is likel // y going to introduce some degree of skewness. vector ModulusTransformation(); vector invModulusTransformation(); //Bickel and Doksum(1981) // --Negative y’s could be allowed. vector AsymptoticBoxCox(); vector invAsymptoticBoxCox(); //Yeo and Johnson (2000) // --Negative y’s could be allowed. // --When estimating the transformation parameter, found the value of // λ that minimizes the Kullback - Leibler distance between // the normal distribution and the transformed distribution. vector ModifiedBoxCox(); vector invModifiedBoxCox(); // Atkinson(1973) // --Negative y’s could be allowed. vector NormalizedBoxCox(); vector invNormalizedBoxCox(); // очистка вектора TimeSeries от сезонности vector Deseasonalization(int); vector invDeseasonalization(); // получение средних сезоональных индексов vector getSeasonalIndex(); // Aggregation time series vector Aggregation(int); vector invAggregation(); // Normalization time series: mean = 0, Sd (Standard deviation) = 1 vector Normalization(); vector invNormalization(); }; #endif