简体   繁体   中英

Pattern prediction in time series

Has anyone tried to predict a specific pattern in time series data?

Example: In a specific time, there is a huge upward spike in certain variables in a time series... How would I build a model to predict that spike when next time it occurs?

Please do respond if anyone working in this area.

I tried with converting that particular series of data in a NumPy array and trying to feed in the model.But Its not allowing me.

Here is the data looks like

在此处输入图像描述

This data is generated in a controlled manner so that we can have these spikes near to near.. In actual case this could b random, and our main objective is to catch this pattern and make a count.

Das, you could try implementing LSTM based Neural Network Models.

See: https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/

It is still preferred that the data contains a trend. If the upward spike happens around the same time of the recurring time interval, it is more likely that you get a better prediction result.

In the image you shared, there seems to be trend in the data. Hence LSTM models can pretty efficiently extract the pattern and output a prediction.

Statistical modelling of the data can also provide better results.

See: https://orangematter.solarwinds.com/2019/12/15/holt-winters-forecasting-simplified/

Das, if outputting the total number of peaks is solely the requirement, then I think heavy neural network models are bit of an overkill. However, neural network models also can pretty well do the job, but require lot of data input for training and fine tuning the weights and biases to give a really good result.

How about you try implementing a thresholding based technique, where you increment a counter every time the data value crosses the preset threshold? In such an approach you should ensure to group very nearby peaks together so that the count is just one for that case. Here you could set a threshold on the x axis too.

ie:- For instance with respect to the given plot, let the y-threshold be 4. Then you will get a count 5 if you consider the y axis threshold (y value 4) alone. This is because for x value at 15:48.2, there are two peaks that cross y value 4. So suppose you set a threshold in the x axis too, then these nearby peaks shall be grouped together within the preset limit and the final count will be 4 (which is the requirement).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM