Discussion of article "Self-organizing feature maps (Kohonen maps) - revisiting the subject" - page 3
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Screenshots of the MetaTrader trading platform
GBPUSD, H1, 2017.03.01
Alpari International Limited, MetaTrader 5, Demo
What is the rainbow?
By the way, took the other data. Again in the third picture there is a rainbow. I suppose that this happens because of your interference in the code from which you wrote this paper. You wrote in the paper that you made some modifications.
Normalising the randomness when initialising nodes does not limit the nodes themselves when training. You can initialise the nodes with units, it will not affect the result.
But it may affect the speed of achieving the result.
The fact that I initialise the nodes with random values from the field between the minimum and maximum for each of the columns separately, simply speeds up convergence, because SOM does not have to drive the nodes into the specified fields at the beginning.
This process is organically woven into the learning process itself, so you can't even say that this is the moment when the grid is driving and this is the moment when it is learning. To drive into a given field means to adjust the node with a very large coefficient of change.
So fundamentally, my intervention did not change anything. It just accelerated the speed of convergence.
But if you have complaints about this mechanism, you are free to fix it. Change the initialisation of nodes when creating the grid in Include\SOMNode.mqh
//| Initialisation of node parameters in the set limit |
//+------------------------------------------------------------------+
void CSOMNode::InitNode(int x1,int y1,int x2,int y2,const double &min_values[],const double &max_values[])
{
//--- set node coordinates
m_x1=x1;
m_y1=y1;
m_x2=x2;
m_y2=y2;
//--- calculation of node centre coordinates
m_x=x1+MathAbs((x2-x1))/2;
m_y=y1+MathAbs((y2-y1))/2;
//--- prepare an array of weights
ArrayResize(m_weights,m_dimension);
//--- initialisation of weights with random values;
for(int i=0; i<m_dimension; i++) {m_weights[i]=min_values[i]+(max_values[i]-min_values[i])*rand()/32768;}
};
Put unnormalised rand() and it will be exactly like in the original algorithm. Like this: m_weights[i]=rand();
Am I right in understanding that if you create a file "optim.csv" like this:
there are only two values:
then running "Sample5_SOM_Net_Player" will show something like this
that is, the Cohen network found that the file "optim.csv" has two ... Two what? Patterns?
That is, if I want to study two neighbouring bars - whether they are bullish or bearish, I need to make a description of such sequences, something like this:
In the end there will be four main sequences ("11", "12", "21", "22") and one fifth - when any bar is neither bullish nor bearish (bar body size is zero).
Then just go through the given number of bars and make a file "optim.csv" in which to write these sequences. You will get something like
Then run "Sample5_SOM_Net_Player". Right?
You have two values, but you have ordered 250 nodes (50x50), so naturally the grid stretches the nodes over the entire field of intermediate values.
Besides, you have entered an insignificant value Time in the clustering field. If you want to use time, then the data structure should somehow reflect the periodicity, otherwise how the grid will understand how Monday differs from Friday. Such a representation of time as you have is reasonable at least on data for several years, then they will meet repetitions (if you remove the values of the year, of course).
Understand a simple idea, the Kohonen grid places nodes in the neighbourhood of similar (in multivariate terms) examples. And then everything will fall into place with the understanding of the work.
You have two values, but you have ordered 250 nodes (50x50), so naturally the grid stretches the nodes over the entire field of intermediate values.
Besides, you have entered an insignificant value Time in the clustering field. If you want to use time, then the data structure should somehow reflect the periodicity, otherwise how the grid will understand how Monday differs from Friday. Such a representation of time as you have is reasonable at least on data for several years, then they will meet repetitions (if you remove the values of the year, of course).
Understand a simple idea, the Kohonen grid places nodes in the neighbourhood of similar (in multivariate terms) examples. And then things will fall into place with understanding the workings.
If I redo the csv file as this format: [candle body size][day of the week (1, 2, 3, 4, 5)] and fill it for, say, 100 bars, I will end up with 100 EXAMPLES in the csv file? And how many nodes to put in that case? 3*3?
If I redo the csv file as this format: [candle body size][day of the week (1, 2, 3, 4, 5)] and fill it for, say, 100 bars, will I end up with 100 EXAMPLES in the csv file? And how many nodes to put in that case? 3*3?
It depends on what you want to get, clustering or regression.
Clustering will combine several examples into one cluster, then the number of nodes should be less than the number of examples.
Regression will require more nodes than examples, to cover fields at points that are not represented in the examples.
Again this process is not binary, so you can't say that it is clustering, but this is regression, imagine it as a multidirectional spectrum, the more clustering the less regression and vice versa. And at the zero point, when the number of nodes is equal to the number of examples, we have approximately equal amounts of clustering and regression.
It depends on whether you want clustering or regression.
Clustering will combine several examples into one cluster, then the number of nodes should be less than the number of examples.
Regression will require more nodes than examples, to cover fields at points that are not represented in the examples.
Well, to simplify, I wanted to get a visualisation for four sequences:
Forum on trading, automated trading systems and testing trading strategies.
Discussion of the article "Once again about Kohonen maps"
Vladimir Karputov, 2017.04.04 13:49
That is, if I want to investigate two neighbouring bars - whether they are bullish or bearish, I need to make a description of such sequences, something like:
In the end there will be four main sequences ("11", "12", "21", "22") and one fifth - when any bar is neither bullish nor bearish (bar body size is zero).
in a given number of bars. That is, I run the script over a given number of bars, and assign one of the five sequences ("0", "11", "12", "21", "22"). I also assign a day of the week. I end up with 100 examples of [sequence name][day of the week] for 100 bars.
Well, to simplify, I wanted a visualisation for four sequences:
in a given number of bars. That is, I pass the script over a given number of bars, and assign one of the five sequences ("0", "11", "12", "21", "22"). I also assign a day of the week. I end up with 100 examples of [sequence name][day of the week] for 100 bars.
Sorry, I don't understand, if you have a combination of conditions and you know them exactly, why do you need a grid?
If not, it is better to show the grid what you are interested in, for example, the difference Open[i]-Close[i] in one column and the difference Open[i+1]-Close[i+1] in another column, and already on the basis of clustering set the conditions which cluster to interpret.
Sorry I don't understand, if you have a combination of conditions and you know exactly what they are, why do you need a grid?
***