Discussion of article "Neural networks made easy (Part 2): Network training and testing"

MetaQuotes
Moderator
245246

New article Neural networks made easy (Part 2): Network training and testing has been published:

In this second article, we will continue to study neural networks and will consider an example of using our created CNet class in Expert Advisors. We will work with two neural network models, which show similar results both in terms of training time and prediction accuracy.

The first epoch is strongly dependent on the weights of the neural network that were randomly selected at the initial stage.

After 35 epochs of training, the difference in statistics increased slightly - the regression neural network model performed better:

Value Regression neural network Classification neural network
Root mean square error 0.68 0.78
Hit percentage 12.68% 11.22%
Unrecognized fractals 20.22% 24.65%

Result of the 35th training epoch of the regression neural network (1 output neuron) Result of the 35st training epoch of the classification neural network (3 output neurons)

Testing results show that both neural network organization variants generate similar results in terms of training time and prediction accuracy. At the same time, the obtained results show that the neural network needs additional time and resources for training. If you wish to analyze the neural network learning dynamics, please check out the screenshots of each learning epoch in the attachment.

Author: Dmitriy Gizlyk

Josh
38
Josh  


For the Fractal.mq5 file, I receive the following error while debugging:


2022.01.13 08:30:54.502 Fractal_1 (BTCUSD,M1) CSeries::CheckLoadHistory: requested too much data (100801)

2022.01.13 08:30:54.502 Fractal_1 (BTCUSD,M1) failed to get 100801 bars for BTCUSD,PERIOD_M1



Any suggestions on how to edit the code to not request greater than the max number of bars of data (10,000)?

Josh
38
Josh  
Here are the files I am working with.
Files:
Fractal.mq5  36 kb
NeuroNet.mqh  40 kb
Dmitriy Gizlyk
27192
Dmitriy Gizlyk  
Josh #:


For the Fractal.mq5 file, I receive the following error while debugging:


2022.01.13 08:30:54.502 Fractal_1 (BTCUSD,M1) CSeries::CheckLoadHistory: requested too much data (100801)

2022.01.13 08:30:54.502 Fractal_1 (BTCUSD,M1) failed to get 100801 bars for BTCUSD,PERIOD_M1



Any suggestions on how to edit the code to not request greater than the max number of bars of data (10,000)?

You are using M1 timeframe. And 10 000 min is only 7 days. It too small to train NN.

Josh
38
Josh  
Dmitriy Gizlyk #:

You are using M1 timeframe. And 10 000 min is only 7 days. It too small to train NN.

Thanks for the reply, Dmitriy!! Should have started with 1H like you do at the end of the article.

Really appreciate your Neural Network Made Easy series! I hope to master these concepts in MQL myself (although it is easier to pass data to R using MTR lol).

These are high potential algorithms and you have done a masterful job with the library and series, thank you!!