Outlier detection is widely applied as part of data mining in many fields,such as finance,telecommunications,business,medical,internet and industrial fields.Outliers detection is one of the main research topics in data mining at the large data age.In view of the importance of outlier detection in data mining,and its wide application,this paper proposes an algorithm that is support vector regression optimized by whale algorithm with seasonally adjusted to test outliers in single variable time series.First,the periodicity of a time series is eliminated by seasonal adjustment,and then the time series is divided by sliding window,and the length of the sliding window is determined by cross validation.Then the time series is predicted by support vector regression algorithm using whale algorithm for parameters optimization.Finally,the confidence interval is determined based on the predicted value and the residual error of the model.If the considered data fall within the confidence interval,the data are judged to be a normal value.If the current data fall outside the confidence interval,the data are judged to be an anomaly.The method proposed in this paper,on the one hand,can avoided to determine the original high wave peak or lower wave valley in the time series as abnormal points.On the other hand,it also has good effect on the detection of abnormal points in time series with obvious fluctuation.Through empirical studies on the simulation data,the air quality index data of Lanzhou,the household electricity data in the vicinity of Mongolian city in Belgium,and the incidence of tuberculosis data in four cities of Beijing,Shanghai,Tianjin and Chongqing in China,the method proposed in this paper is compared with the commonly used anomaly detection methods.From the final results of the empirical studies on the four sets of data,the method proposed in this paper has a good effect in outlier detection. |