Neural networks. Questions from the experts. - page 18

 
lasso:

I never asked for the source code, just the dll and the header.

I don't know what you see in dll itself, but please, don't mind... But Joo was absolutely right, maybe not a file, but rasp is needed. The source will request to enter inputs manually, I should redo it for batch input, that's what I did, but I've already forgotten it).
Files:
knpr.rar  18 kb
 
Figar0:
I don't know what you see in the dll itself, but please, it's not a pity... But Joo was absolutely right, maybe not a file, but a rasp is needed there. The source will request to enter inputs manually, you need to remake it for batch input, which is actually what I did, but I've already forgotten)
File. A file is cooler. A rasp is almost a saw.
 
Figar0:
I don't know what you see in the dll itself, but please, it's not a pity... But Joo was absolutely right, maybe not a file, but a rasp is needed there. The source will request to enter inputs manually, you need to remake it for batch input, which is actually what I did, but I've already forgotten)

)) Thank you for the bare dll. I won't bother you any more...

 
lasso:

)) Thanks for the bare dll. I won't bother you any more...



Well, I told you right away that there's no source left ))))
 
Figar0:

I told you right away that there were no sources left ))))

Well, how do you call functions in this dll?

Show me the wrapper too )))

 
lasso:

Well, how do you call the functions in this dll?

Show me the wrapper, too ))


What wrapper? Just a call from the EA:

#import "KNpr.dll"
double research(double arrayohlc[]);
#import

int start()
{
   double inputs[20], result;
   for (int i=0;i<20;i++)
   {
     inputs[i]=Open[i]-Open[i+1];
   }          
   result=research(inputs);
   if (result>0) Открываем бай
   if (result<0) Открываем селл 
....
}
 
Figar0:


What kind of wrapper? Just a call from the EA:

Shit. Trapped in the stereotype again. )

In my mind, neural network library is something like Fann2MQL.dll, with training etc.

And you, sorry, don't have a library at all, just a little brochure...)

.........................

Well, that's fine. At least we figured out that there is no easy and transparent output from Statistics 6/8.

Only through dancing with tambourines...

A little later I will try to describe my dancing... Maybe someone will find it useful....

 
lasso:

And you, excuse me, don't have a library at all, just a small booklet...)


I have just what this "statistics" gives out) Preparation of data, its preprocessing, interpretation of results all in the Expert Advisor, it's easier, more convenient and understandable (in the example it's simply omitted). I've even managed to create rather large neural network commits out of such "brochures". Actually, I don't need anything else. We have built the network, quickly enough trained it in a specially prepared environment and put it to good use. What else needs to be done? The rework is really not complicated, otherwise I could not have done it myself.

And Fann2MQL is a handwritten library, of course, it has everything, that's why it was written. But, one, this is a completely different level of programming, professional. Two, sharpening (thanks to (without sarcasm) tara for a debriefing on variety of those abrasive tools) the same statistics code is a bit easier, than even just figuring out how to use a library similar to Fann2MQL. Well, that's how it is for me personally.

 
Figar0:


I have exactly what this "statistics" shows) Data preparation, its preprocessing, interpretation of NS results are all in the Expert Advisor, it's easier, more convenient and understandable (in the example, all this is simply omitted). I've even managed to create rather large neural network commits out of such "brochures". Actually, I don't need anything else. We have built the network, quickly enough trained it in a specially prepared environment and put it to good use. What else needs to be done? The rework there really isn't hard, otherwise I couldn't have done it myself either.


joo:
But you still have to dig around in the code, and every time after training.

Nah, bros, I'm too "lazy" to do it every time.... ))

.......................

My fault for not voicing my goals.

I ask the questions and I don't know what I want. I stand corrected.

......................

Aim: -- from very simple classifying NS of 1:1-N-1:1 format, where N is number of neurons in hidden layer (from 3 to 7), each responsible for its own "pattern",

create a committee of networks that would give a weighted output (prediction).

-- An EA should be built with the "All-in-One" principle.

For example: 1999-2000 on M15 by opening prices we find some "patterns", create a set of training examples (TI), train networks, save them to a file.

Then we launch the Expert Advisor on the range of 2001-2010.

During initialization: 1. it loads the nets prepared in the special program from the file (i.e. fann4MT_create_standard function is not used),

2. loads OPs on which nets were learned.

That is all. This is where user intervention ends. No optimizations.

.....................

During operation, the Expert Advisor:

-- Executes trade operations

-- accumulates new OPs at the same time

-- performs retraining when specified events occur.

.....................

If the results of his work for 10 years, we are satisfied, then we give him a ticket to life. (And a sanatorium for ourselves))

.....................

And most importantly:

the question "Where's the line...??" won't have to be answered!

 
lasso:

Whatever. At least we figured out that there is no easy and user-friendly output from Statistics 6/8.

Only through dancing with tambourines...

A little later I will try to describe my dancing... Maybe someone will find it useful....

So... A quick paragraph by paragraph. If any point will be of interest to anyone, I will describe it in more detail.

.................................

Task:

Transfer network created for classification tasks in "Statistics 6|8" package to MQL4|5 environment.

An example for the classification task in the trading context is here. (fifth post from the bottom)

Dancing:

1) I decided to implement the neural network in MT4 Expert Advisor based on fann2MQL.dll library

2) I chose fannExplorer as a graphical adapter ( full selection here)

3) Create a new network in fannExplorer and using the parameters we know from "Statistics" select the number of layers, number of neurons per layer, activation functions down to a specific neuron, etc.

4) Prepare training examples file (TFS) for fannExplorer, remembering that the TFS themselves are the same as for "Statistics 6", but the data format is different.

5) I did the same with test examples but saved them in a separate file with the extension *.test

6) Train and test the network in fannExplorer, based on the results obtained in "Statistics".

7) Save the required configuration (or several configurations) to a file for further loading and use in the MQL program.

..............................

There are some goodies in fannExplorer that are not available in fann2MQL.dll, but there are also some outright inconveniences.

................................

P.S. I want to hear from people using NSDT, because I imagine everything is easier and simpler there.

And is it possible in NSDT to create and export to DLL classifying net? That it would immediately produce nominal outputs {1;-1} for example.

Since in FANN this is a definite problem....