Rejoignez notre page de fans
- Vues:
- 10328
- Note:
- Publié:
- 2011.12.02 12:42
- Mise à jour:
- 2016.11.22 07:32
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
CNetMLP provides multilayer perceptron (MLP).
The feature of the class is that input vector and network structure notions are separated, i.e. input vector and network structure descriptions are not connected to each other.
The size of the input vector can have any value within reasonable limits. Input data should be normalized, i.e. the data should be within the range -1 .. 1 or 0 .. 1. Various activation functions are applied for the network depending on the type of the used data: hyperbolic tangent should be used for -1..1 data range, while sigmoid is used for 0..1 data range.
The network has a layer-by-layer structure with a direct signal transmission. The network structure is described by a one-dimensional array, where the value of the array element determines the number of neurons in the appropriate layer. The number of layers and neurons is not limited. The network may consist of a single neuron.
Each neuron has multiple inputs, defined by its place in the network, and one output. If you need the network to give out N responses, the last layer should contain N neurons. The learning algorithm is iRprop. Input and output training data are located in one-dimensional arrays vector by vector. The learning process is limited either by the number of learnnig epochs or by a permissible error.
Creation of the network is declared to be the class parametric constructor.
CNetMLP *net=new CNetMLP(
the number of layers, network structure array, input vector size, activation function type: 0 - sigmoid, 1 - hyperbolic tangent).
Network teaching is provided by calling the Learn method (the number of teaching patterns, input data array, output data array, the number of learning cycles, permissible learning error). Teaching result can be checked through the class variables: mse – the learning error and epoch – the number of accomplished learning cycles.
Calculate method (input vector array, network response array) is used for getting the network response.
Save (open the file handle with FILE_WRITE and FILE_BIN flags) and Load (open the file handle with FILE_READ and FILE_BIN flags) methods are intended for saving the network to a file and loading the network from the file respectively. Only learning errors and the weight array are saved to the file. Compliance of the created and the downloaded networks must be verified before the Load method (handle) is used.
Using of the class is shown in the attached specimen. The class and the specimen files must be placed in one folder.
Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/596
![WPRSI signal](https://c.mql5.com/i/code/indicator.png)
The indicator gives trading signals using colored arrows on a chart. The signals are based on the WPR (Williams’ Percent Range) and RSI (Relative Strength Index) technical indicators.
![Leading](https://c.mql5.com/i/code/indicator.png)
The indicator consisting of two moving averages (Lead and its EMA smoothing) on one chart from John Ehlers' book "Cybernetic Analysis for Stocks and Futures: Cutting-Edge DSP Technology to Improve Your Trading".
![EQUILIBRIUM-2011](https://c.mql5.com/i/code/expert.png)
Multicurrency "grider" with risk control (version for Automated Trading Championship 2011 and updated version).
![Modified Optimum Elliptic Filter](https://c.mql5.com/i/code/indicator.png)
Modified elliptic filter from John Ehlers' book "Cybernetic Analysis for Stocks and Futures: Cutting-Edge DSP Technology to Improve Your Trading"