Machine learning in trading: theory, models, practice and algo-trading - page 399

 
Mihail Marchukajtes:


That's where I'm willing to bet. This is from practice. That's what I observe while using the optimizer.


But in the demo on his site 5 columns and a large number of rows
 
Mihail Marchukajtes:


Here's where I'm willing to bet. This is from practice. What I'm observing while using the optimizer.

If there are fewer columns than rows, the number of inputs becomes smaller than the conditional size of the polynomial network.

If the number of columns and rows are equal, then the number of inputs and the size of the polynomial are approximately the same.

If there are more columns than rows, then the size of polynomial is less than the number of inputs.

In other words, the number of columns and rows must be about the same. Then the polynomial is obtained with sufficient number of inputs, and its size is about the same as the number of inputs.

In other and other words. The larger the file, the more multiparametric the model becomes. The number of inputs and the size of the polynomial increase, which indicates that the model becomes smarter. So there you go.

Also, when running the same file repeatedly, the set of input parameters is always different. This is due to random partitioning of the sample during division. But if we run the same file and get totally different models, they will still work approximately the same, at least they should. This is the answer to the question of which fish are in the given file. If data differ from run to run, it says that the data has nothing to do with the output. It's like this....

The polynomial is only built to take everything out of it and leave 3 for one network and 3 for another.
 
elibrarius:
The Polynome is only built to take everything out of it and leave 3 for one network and 3 for another.

Look at the code carefully. There are three states which are 1, 0 and -1. So this is the result of two meshes, to send signals to the trade....
 
Mihail Marchukajtes:


What coupling coefficients, what are you talking about. Here's a list of used inputs, but what you see there before each polynomial there is a normalization, and there are 8 inputs described, look below at the bottom of the file.

//Variable x0: Del

//Variable x1: Del1

//Variable x2: VDel

//Variable x3: VDel1

//Variable x4: VDel6

//Variable x5: ST5

//Variable x6: VAD11

//Variable x7: VVolum4

Where are the three inputs????? When there are eight of them.
you have x0...x7 = p0...p7 - from the formula above (just named differently) the formula is taken from Reshetov's article describing his neuron. And according to the formula there are only 3 inputs - A,B and C
 
Maxim Dmitrievsky:

But in the demo on his site 5 columns and a large number of rows

The thing is that I've figured out his demo file..... There is a recurring data, imagine that there are 5 columns and each of their rows can be recorded only one of the three values of 1-1il0. In this case, there will be repeated rows, and now increase my dataset by half. Simply copy lines and generalization level will grow significantly, up to 90%, but unfortunately it will be a REBUILDING. I know... I've tested it more than once, so.....
 
elibrarius:
you have x0...x7 = p0...p7 - from the formula above (just named differently) the formula is taken from Reshetov's article describing his neuron. And according to the formula there are only 3 inputs - A,B and C

Yes that article about RNN it has nothing to do with this optimizer is completely different work, don't you understand. Although inside the optimizer something may be used from this article, but they are completely different works if anything.....
 
Mihail Marchukajtes:

The thing is that I've figured out his file demo..... The trick is that there are repeating data, imagine that there are 5 columns and each of their rows can be written only one of three values 1-1il0. In this case, there will be repeated rows, and now increase my dataset by half. Simply copy lines and generalization level will grow significantly, up to 90%, but unfortunately it will be a REBUILDING. I know... I've tested it more than once, so.....

There's a 50/50 split sample, right? I'm doing a comparison with other models now
 
Eh, where to get power.... More power :-)
 
Maxim Dmitrievsky:

I'm doing a 50/50 split, right?


Actually, dividing a training set into two samples is very tricky... There's no concept of time, from the past to the future. it's not necessary for classification, it's necessary for approximation.

But the division is also done in a very tricky way. Here's a tip. It is important that the number of zeros and ones in the output variable is equal. Then the division is clear, if the number is not equal, then there is an addition. In general, a clever way of dividing there if in what...

 
Mihail Marchukajtes:

Look at the code carefully. There are three states: 1, 0 and -1. So this is the result of two grids, to transmit signals to the trade....

I'm figuring out how each grid works separately. And what to get from their outputs is a matter of taste)

By the way, looking at the code from your file - there is a different formula, not as in the article, i.e. not

double RNN(double p1,double p2,double p3)
  {
//--- вероятности для правил из базы знаний экспертной системы
   double y0 = x0; // Вероятность правила №0 в процентах
   double y1 = x1; // Вероятность правила №1 в процентах
   double y2 = x2; // Вероятность правила №2 в процентах
   double y3 = x3; // Вероятность правила №3 в процентах
   double y4 = x4; // Вероятность правила №4 в процентах
   double y5 = x5; // Вероятность правила №5 в процентах
   double y6 = x6; // Вероятность правила №6 в процентах
   double y7 = x7; // Вероятность правила №7 в процентах

//--- база знаний, состоящая из набора взаимоисключающих правил
   double probability=
                      (1.0 - p1) * (1.0 - p2) * (1.0 - p3) * y0 + // Правило №0
                      (1.0 - p1) * (1.0 - p2) * p3 * y1 +         // Правило №1
                      (1.0 - p1) * p2 * (1.0 - p3) * y2 +         // Правило №2
                      (1.0 - p1) * p2 * p3 * y3 +                 // Правило №3
                      p1 * (1.0 - p2) * (1.0 - p3) * y4 +         // Правило №4
                      p1 * (1.0 - p2) * p3 * y5 +                 // Правило №5
                      p1 * p2 * (1.0 - p3) * y6 +                 // Правило №6
                      p1 * p2 * p3 * y7;                          // Правило №7

//--- конвертируем проценты в вероятности
   probability=probability/100.0;

//--- возвращаем результат в виде вероятности
   return(probability);
  }

а

double getBinaryClassificator1(double v0, double v1, double v2, double v3, double v4, double v5, double v6, double v7) {
   double x0 = 2.0 * (v0 + 1189.0) / 2047.0 - 1.0;
   double x1 = 2.0 * (v1 + 810.0) / 2247.0 - 1.0;
   double x2 = 2.0 * (v2 + 1636.0) / 2155.0 - 1.0;
   double x3 = 2.0 * (v3 + 558.0) / 1252.0 - 1.0;
   double x4 = 2.0 * (v4 + 139.0) / 494.0 - 1.0;
   double x5 = 2.0 * (v5 + 74.97643) / 144.15451 - 1.0;
   double x6 = 2.0 * (v6 + 1026.56016) / 1938.48639 - 1.0;
   double x7 = 2.0 * (v7 + 4167.0) / 7074.0 - 1.0;
   double decision = 3.162907268170426 * sigmoid(x0)
  -1.0554004772410066 * sigmoid(x1 + x2 + x3)
  + 3.8921930574940347 * sigmoid(x0 + x1 + x4)
  -1.3775531643479957 * sigmoid(x1 + x2 + x3 + x4)
  -0.44704575810784447 * sigmoid(x0 + x5)
  -0.012703915477316044 * sigmoid(x0 + x1 + x5)
  -7.231026668467576 * sigmoid(x2 + x5)
  -0.059339966683175004 * sigmoid(x2 + x4 + x5)
  -2.786314588867378 * sigmoid(x0 + x1 + x2 + x4 + x5)
  + 2.1339726561913768 * sigmoid(x0 + x1 + x6)
  -0.49562529077183975 * sigmoid(x0 + x4 + x6)
  + 5.2147434454399475 * sigmoid(x0 + x3 + x4 + x6)
  -2.890797352663095 * sigmoid(x5 + x6)
  + 0.10933021175693726 * sigmoid(x0 + x5 + x6)
  -1.6844056248405446 * sigmoid(x1 + x2 + x5 + x6)
  -0.18093137034202272 * sigmoid(x1 + x3 + x5 + x6)
  + 0.6607987033451893 * sigmoid(x1 + x7)
  -1.8854921735476415 * sigmoid(x0 + x1 + x3 + x7)
  -1.1169615655906233 * sigmoid(x2 + x5 + x7)
  -0.6844731589452674 * sigmoid(x4 + x6 + x7)
  -0.4231236774571158 * sigmoid(x1 + x2 + x3 + x4 + x6 + x7)
  + 5.763615625891075 * sigmoid(1.0 + x1 + x2 + x3 + x5)
  -0.3138985187519697 * sigmoid(1.0 + x0 + x1 + x4 + x5)
  -1.8910224663455044 * sigmoid(1.0 + x1 + x3 + x4 + x5)
  + 2.1204658352467995 * sigmoid(1.0 + x2 + x3 + x4 + x5)
  + 6.219005597826903 * sigmoid(1.0 + x2 + x3 + x4 + x6)
  -3.740916662914772 * sigmoid(1.0 + x0 + x1 + x3 + x4 + x5 + x6);
   return decision;
}

Apparently the author modified the formula

So maybe not 3 inputs (as in the original formula), but still 8... I haven't understood the essence of the new formula yet.

Reason: