Discussion of article "Naive Bayes classifier for signals of a set of indicators" - page 3

 
Комбинатор:

only if all strategies are mutually independent and give a probability greater than 0.5

I took a closer look at the formula

P(Win|ABC) = P(Win|A)* P(Win|B)* P(Win|C) /[ P(Win|A)* P(Win|B)* P(Win|C) - (1 - P(Win|A))* (1 - P(Win|B))* (1 - P(Win|C))) ]

This value is always greater than one (the numerator is greater than the denominator). What is the correct formula?
 
fxsaber:

I took a closer look at the formula

This value is always greater than one (the numerator is greater than the denominator). What is the correct formula?

Thanks for noticing the typo. There should be a "+" there, not a minus "-" https://ru.wikipedia.org/wiki/%D0%91%D0%B0%D0%B9%D0%B5%D1%81%D0%BE%D0%B2%D1%81%D0%BA%D0%B0%D1%8F_%D1%84%D0%B8%D0%BB%D1%8C%D1%82%D1%80%D0%B0%D1%86%D0%B8%D1%8F_%D1%81%D0%BF%D0%B0%D0%BC%D0%B0

Let's fix it.


Байесовская фильтрация спама — Википедия
Байесовская фильтрация спама — Википедия
  • ru.wikipedia.org
Ба́йесовская фильтра́ция спа́ма — метод для фильтрации спама, основанный на применении наивного байесовского классификатора, опирающегося на прямое использование теоремы Байеса. Теорема Байеса названа в честь её автора Томаса Байеса (1702—1761) — английского математика и священника, который первым предложил использование теоремы для...
 
Alexey Nikolaev:

it is known that the series of prices is close to be considered as a series of independent increments. Therefore, the set of n random variables d(1)=p(2)-p(1), d(2)=p(3)-p(2), ... d(n-1)=p(n)-p(n-1), p(n) will be close to independent. Now, any set of functions from our set will be independent if any argument is included only in the expression of one of them. To put it simply: the set for four bars from functions I1(d1,d2) and I2(d3,p4) will be independent, but I1(d1,d2,d3) and I2(d3,p4) will not be independent, because of d3.
For example, two different MAs will always be dependent. But if you take two MAs such that the second one is shifted back in time by the period of the first one, then a system of the first MA and their difference will be independent.

This is very similar to finding the embedding space N and time delay Tau of chaotic processes, only there the "set" - a vector for one point of the modified multidimensional space - is made of N not consecutive samples of the original time series, but with a step Tau. Original source. The authors used this algorithm for neural network forecasting, but the essence is the same - independence of predictors - it is needed there at the input of the network just as in our statistical formula.

 
Stanislav Korotky:

This is very similar to finding the embedding space N and time delay Tau of chaotic processes, only there the "set" - a vector for one point of the modified multidimensional space - is made of N not consecutive samples of the original time series, but with a step Tau. Original source. The authors used this algorithm for neural network forecasting, but the essence is the same - independence of predictors - it is needed there at the input of the network just as in our statistical formula.

The similarity is undoubtedly there, as the field of dynamic chaos research uses methods of the theory of random processes. I cannot judge to what extent and whether this is always justified. On the one hand it is constantly emphasised that stochastic and chaotic systems are fundamentally different (e.g. when the dimensionality of the embedding increases), and on the other hand, for example, all our computer random number generators are still dynamical systems, but they are somehow studied by means of theorver. Regarding the application of chaos to the market - Peters in his book calculated the attractor of some prices and it turned out to be of some huge dimension.
 

It's a typo made by the editor between the 3rd and 4th revision. In the 3rd revision the formulae are written in text by me - everything is correct there, but in the 4th revision the formulae are already in the form of a picture and with an error.

 

The implementation is throwing few errors while using RubbArray.mqh

'data' - structures containing objects are not allowed  RubbArray.mqh   80      23



 
Verbatino:

The implementation is throwing few errors while using RubbArray.mqh

Yes, MetaQuotes have changed MQL language since the publication date, breaking back compatibility (alas) with many existing source codes. ArrayCopy can not be used for arbitary pointers anymore.

You may use the attached header file as a relacement.

Files:
RubbArray.mqh  3 kb
[Deleted]  

How to fix that something would work? ) Expert Advisor doesn't compile, MT5.

code generation error           1 

and why write code with a lot of vornings?

'indstats.mq5'  indstats.mq5    1       1
'MarketMQL4.mqh'        MarketMQL4.mqh  1       1
'ind4to5.mqh'   ind4to5.mqh     1       1
macro redefinition      ind4to5.mqh     170     9
macro redefinition      ind4to5.mqh     171     9
macro redefinition      ind4to5.mqh     174     9
'mt4orders.mqh' mt4orders.mqh   1       1
macro redefinition      mt4orders.mqh   412     9
macro redefinition      mt4orders.mqh   413     9
'IndicatN.mqh'  IndicatN.mqh    1       1
'fmtprnt2.mqh'  fmtprnt2.mqh    1       1
'RubbArray.mqh' RubbArray.mqh   1       1
'Expert0fix.mqh'        Expert0fix.mqh  1       1
'HashMapTemplate.mqh'   HashMapTemplate.mqh     1       1
possible loss of data due to type conversion    MarketMQL4.mqh  49      8
possible loss of data due to type conversion    MarketMQL4.mqh  61      8
possible loss of data due to type conversion    MarketMQL4.mqh  63      8
possible loss of data due to type conversion    MarketMQL4.mqh  65      8
possible loss of data due to type conversion    MarketMQL4.mqh  77      8
possible loss of data due to type conversion    MarketMQL4.mqh  79      8
possible loss of data due to type conversion    MarketMQL4.mqh  89      8
possible loss of data due to type conversion    MarketMQL4.mqh  91      8
possible loss of data due to type conversion    MarketMQL4.mqh  103     8
declaration of 'line' hides member declaration at line 14       fmtprnt2.mqh    21      39
   see previous declaration of 'line'   fmtprnt2.mqh    14      12
possible loss of data due to type conversion    IndicatN.mqh    945     45
possible loss of data due to type conversion    IndicatN.mqh    947     51
possible loss of data due to type conversion    IndicatN.mqh    947     73
possible loss of data due to type conversion    IndicatN.mqh    947     95
possible loss of data due to type conversion    IndicatN.mqh    947     117
possible loss of data due to type conversion    IndicatN.mqh    947     139
possible loss of data due to type conversion    IndicatN.mqh    947     161
possible loss of data due to type conversion    IndicatN.mqh    951     45
possible loss of data due to type conversion    IndicatN.mqh    953     47
possible loss of data due to type conversion    IndicatN.mqh    953     69
possible loss of data due to type conversion    IndicatN.mqh    953     113
possible loss of data due to type conversion    IndicatN.mqh    955     52
possible loss of data due to type conversion    IndicatN.mqh    957     52
possible loss of data due to type conversion    IndicatN.mqh    961     45
possible loss of data due to type conversion    IndicatN.mqh    961     67
possible loss of data due to type conversion    IndicatN.mqh    963     50
possible loss of data due to type conversion    IndicatN.mqh    965     51
possible loss of data due to type conversion    IndicatN.mqh    965     73
possible loss of data due to type conversion    IndicatN.mqh    967     47
possible loss of data due to type conversion    IndicatN.mqh    971     47
possible loss of data due to type conversion    IndicatN.mqh    971     69
possible loss of data due to type conversion    IndicatN.mqh    971     91
possible loss of data due to type conversion    IndicatN.mqh    971     113
possible loss of data due to type conversion    IndicatN.mqh    971     135
possible loss of data due to type conversion    IndicatN.mqh    971     157
possible loss of data due to type conversion    IndicatN.mqh    973     50
possible loss of data due to type conversion    IndicatN.mqh    973     72
possible loss of data due to type conversion    IndicatN.mqh    973     94
possible loss of data due to type conversion    IndicatN.mqh    975     50
possible loss of data due to type conversion    IndicatN.mqh    975     72
possible loss of data due to type conversion    IndicatN.mqh    977     45
possible loss of data due to type conversion    IndicatN.mqh    979     44
possible loss of data due to type conversion    IndicatN.mqh    979     66
possible loss of data due to type conversion    IndicatN.mqh    981     46
possible loss of data due to type conversion    IndicatN.mqh    981     68
possible loss of data due to type conversion    IndicatN.mqh    981     90
possible loss of data due to type conversion    IndicatN.mqh    981     112
possible loss of data due to type conversion    IndicatN.mqh    985     46
possible loss of data due to type conversion    IndicatN.mqh    985     68
possible loss of data due to type conversion    IndicatN.mqh    985     90
possible loss of data due to type conversion    IndicatN.mqh    985     112
possible loss of data due to type conversion    IndicatN.mqh    987     45
possible loss of data due to type conversion    IndicatN.mqh    987     67
possible loss of data due to type conversion    IndicatN.mqh    989     45
possible loss of data due to type conversion    IndicatN.mqh    994     48
possible loss of data due to type conversion    IndicatN.mqh    994     70
possible loss of data due to type conversion    IndicatN.mqh    996     52
possible loss of data due to type conversion    IndicatN.mqh    996     74
possible loss of data due to type conversion    IndicatN.mqh    996     96
possible loss of data due to type conversion    IndicatN.mqh    998     45
possible loss of data due to type conversion    IndicatN.mqh    1011    42
possible loss of data due to type conversion    IndicatN.mqh    1419    54
possible loss of data due to type conversion    IndicatN.mqh    1538    15
declaration of 'e' hides global declaration in file 'indstats.mq5' at line 50   IndicatN.mqh    1582    160
   see previous declaration of 'e'      indstats.mq5    50      8
possible loss of data due to type conversion    IndicatN.mqh    1635    75
possible loss of data due to type conversion    IndicatN.mqh    1849    49
possible loss of data due to type conversion    Expert0fix.mqh  254     18
possible loss of data due to type conversion    IndicatN.mqh    707     9
possible loss of data due to type conversion    IndicatN.mqh    707     9
possible loss of data due to type conversion    IndicatN.mqh    707     9
possible loss of data due to type conversion    IndicatN.mqh    707     9
implicit conversion from 'number' to 'string'   fmtprnt2.mqh    62      44
implicit conversion from 'number' to 'string'   fmtprnt2.mqh    77      17
implicit conversion from 'number' to 'string'   fmtprnt2.mqh    93      17
code generation error           1       1
1 error(s), 79 warning(s)               2       80
 

As for code generation error - as always - in SD.

Warnings can be removed, I didn't create them on purpose, just a lot of inherited code, but now I've moved away from MQL - I can optimise them if you want, I have the source code.

 
I am posting corrected codes (without warnings). On old MT5 builds without support of serial functions a la MT4, without iBars and iBarShift - their implementations are enabled by MT5_BUILD_IS_LESS_THAN_1860 macro.
Files:
MQL45.zip  25 kb