3
$\begingroup$

I want to try CNN in the task of stock chart pattern recognition. I suspect that feeding a line chart won't work because the image will have a lot of empty pixels.

What time series encoding options are available to get a lossless, dense image?

$\endgroup$

2 Answers 2

2
$\begingroup$

1D CNN :

enter image description here

You do not have to convert it into an image for CNN. CNN can work directly on time-series (1D Convolution Network).

More Details :

What is a 1D Convolutional Layer in Deep Learning?

Examples for time-series :

https://towardsdatascience.com/stock-price-prediction-system-using-1d-cnn-with-tensorflow-js-machine-learning-easy-and-fun-fe5323e68ffb

https://jeddy92.github.io/JEddy92.github.io/ts_seq2seq_conv/

https://machinelearningmastery.com/how-to-develop-convolutional-neural-network-models-for-time-series-forecasting/

Image as input to CNN

Image can be fed into CNN like any other image. CNN will learn to ignore all whitespace and tune first few filters as edge-detection filters.

In such models, output variable will be the direction or a band of percentages (say next stock tick will be in a band of 0 - 1% or 0 -1%).

$\endgroup$
3
$\begingroup$

You can encode time series to images using image encoding methods like Recurrence Plots (RP), Gramian Angular Field (GAF), Markov Transition Field (MTF).

See the following article:

Estebsari, A.; Rajabi, R. Single Residential Load Forecasting Using Deep Learning and Image Encoding Techniques. Electronics 2020, 9, 68. https://doi.org/10.3390/electronics9010068

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.