Falcon Rig EA

3 December 2023, 12:22
Sof'ia Vlasova
0
146
Introduction

Kohonen maps or Self-Organizing Maps (SOM) or Self-Organizing Feature Maps (SOFM) is a teacherless machine learning technique used to create a low dimensional (usually two-dimensional) space to represent a multivariate data set while preserving the topological structure of the data. For example, have a dataset of p variables measured in n observations - these can be represented as clusters of observations with the same values of the variables. These clusters can then be represented as a two-dimensional map, with observations in close clusters having more similar values than those in distant clusters. This can simplify visualization and analysis of multivariate data.

Kohonen maps

Kohonen maps were developed by Finnish mathematician Teuvo Kohonen in the 1980s.

General information

A Kohonen map consists of a grid of neurons that are connected to neighboring neurons. During training, input data is presented to the network and each neuron calculates its similarity to the input data. The neuron with the highest similarity becomes the winner and its weights are adjusted to better match the input data.

a grid of neurons

Over time, neighboring neurons also adjust their weights to become more similar to the winning neuron, resulting in a topological ordering of neurons in the map. This self-organization process allows complex relationships between inputs to be represented in a lower dimensional space through Kohonen maps. This capability is very valuable for data visualization and clustering.

Learning Algorithm

The goal of the self-organizing map algorithm is to get different parts of the network to respond in the same way to certain input patterns. This is partly motivated by the way visual, auditory, and other information is processed in certain parts of the human brain.


Let's see how this algorithm works as applied to mathematical calculations and the MQL5 code.

Algorithm steps

The development of the algorithm consists of four main steps:


Step 1 is initialization of weights . Random values can be used. Other parameters such as learning rate and number of clusters are also initialized in this step.

of Kohonen's class of maps.

The Kohonen Kart neural network

A self-organizing map is a type of artificial neural network that, unlike other types of artificial neural networks that learn by error, such as back propagation with gradient descent, Kohonen maps use competitive learning.

In competitive learning, neurons in a Kohonen map compete against each other to become the "winner". To do this, the neuron must be the most similar to the input data.

In the training phase, each input data point is represented on the Kohonen map. The similarity between the input data and the weight vector of each neuron is then calculated. The neuron whose vector is most similar to the input data is determined as the winner or the "best matching unit" (BMU).

The BMU is chosen based on the smallest Euclidean distance between the input data and the neuron's weight vector. The winning neuron then updates its weight vector, making it more similar to the input data. The weight update formula used is the Kohonen learning rule, which moves the weight vector of the winning neuron and its neighboring neurons closer to the input data.

SOM

Benefits of Kohonen Cards

Kohonen maps have a number of advantages:


They can capture non-linear relationships between the input data and the output map, that is, they can handle complex patterns and data structures.

They can find patterns on unlabeled data. That is, they can be used when the labeled data is insufficient or difficult to obtain.

By reducing the dimensionality of the input data, the computational complexity of subsequent tasks such as regression and classification is reduced.

Topological relations between the input data and the output map are preserved: close neurons in the map correspond to similar regions in the input space, which can help in data exploration and visualization.

Resistant to noise and outliers in the input data if the noise is too large.

SOM

Conclusion

Kohonen maps or self-organizing maps are an innovative approach to trading that can help traders navigate the markets. Using unsupervised learning, Kohonen maps can identify patterns and structures in market data, allowing traders to make informed decisions. Kohonen maps can identify non-linear relationships in data and cluster data into appropriate groups. However, when working with them, one should be aware of potential drawbacks such as sensitivity to initialization, lack of formal convergence criteria, etc. In general, Kohonen Cards show excellent results in trading the markets, I have used Matrix and Kohonen Cards in my New EA Falcon Rig EA, which you can try out in your trading now. 


Share it with friends: