Libraries: GRNN Neural Network Class

 

GRNN Neural Network Class:

The class realizes generalized regression network (General Regression Neural Network - GRNN)

Author: Yury Kulikov

 
Automated-Trading:

GRNN Neural Network Class:

Author: Yury Kulikov

Hi  Yury Kulikov, in you file test_grnn_mul_add.mq5  , you test data integer odd number from 1 to 9 ,and after test ,you use a rand number from 1 to 10 for check ,it is all right,but if i use a number not between 1 and 10 ,it is not work .

So i get a big problem how to  define the test range  before it happen ?  if i cann't get ,the network seemingly useless ! 

 
Has anyone tried to figure it out? Is it possible to train without an array of output training data? How?
 
Is there any C / C ++ code for this?
 
jommerbot:
Has anyone tried to figure it out? Is it possible to train without an array of output training data? How?
I wonder what you would feed as a training sample then?
 

there is such a line #122 in the code: d=sigma[i]==0.0?0.0:(m_inp[i]-inputvector[i])/sigma[i];

so what does 0.0?0.0:?

The point is that I am rewriting the code into another language and in one of the iterations m_inp[i]-inputvector[i] = 0, respectively sigma[i] = 0. It follows from this that dividing by zero is ugly. I suppose the problem is that I don't understand what ==0.0?0.0 means:

 
daliel:

there is such a line #122 in the code: d=sigma[i]==0.0?0.0:(m_inp[i]-inputvector[i])/sigma[i];

so what does 0.0?0.0:?

The point is that I am rewriting the code into another language and in one of the iterations m_inp[i]-inputvector[i] = 0, respectively sigma[i] = 0. It follows from this that dividing by zero is ugly. I suppose the problem is that I don't understand what ==0.0?0.0 means:

It's a shortened if - else notation

if(sigma[i] == 0.0) {
    d = 0;
}
else {
    d = (m_inp[i] - inputvector[i]) / sigma[i];
}

there is no division by zero.

 
Event:

It's an abbreviated if - else entry

there is no division by zero.

i.e. if the result of (m_inp[i]-inputvector[i])/sigma[i]; is 0, then sigma[i] does not change, but only d changes?
 
daliel:
i.e. if the result of (m_inp[i]-inputvector[i])/sigma[i]; is 0, then sigma[i] does not change, but only d changes?
Conditional operator ?
 
daliel:
i.e., if the result (m_inp[i]-inputvector[i])/sigma[i]; is 0, then sigma[i] does not change, but only d changes?

Thesigma[i] does not change, it is only compared to zero.

And d changes from the result of this comparison