Discussion of article "Random Decision Forest in Reinforcement learning" - page 2

 

Thanks for opening my eyes to the Alglib library which I didn't realise comes with the latest version of Metatrader 5....

I found myself reinventing the wheel somewhat!

 

Hey, this article is so fascinating. However when I try compile the random decision forest regression model 93 errors are thrown.

The first error is an undeclared identifier error. The variable trying to be called is the m_buffsize property of the RDF.

The call is from the OnTester Event Handler. I've included and extract of the code.


double OnTester()
  {
   if(clear_model) return 0;

   if(MQLInfoInteger(MQL_OPTIMIZATION)==true)
     {
      if(numberOfsamples>0)
        {
         CDForest::DFBuildRandomDecisionForest(RDFpolicyMatrix,numberOfsamples,3,1,number_of_trees,regularization,RDFinfo,RDF,RDF_report);
        }
      
      FileDelete("RDFBufsize"+_Symbol+(string)_Period+".txt",FILE_COMMON);
      FileDelete("RDFNclasses"+_Symbol+(string)_Period+".txt",FILE_COMMON);
      FileDelete("RDFNvars"+_Symbol+(string)_Period+".txt",FILE_COMMON);
      FileDelete("RDFMtrees"+_Symbol+(string)_Period+".txt",FILE_COMMON);
      
      int filehnd=FileOpen("RDFBufsize"+_Symbol+(string)_Period+".txt",FILE_READ|FILE_WRITE|FILE_CSV|FILE_ANSI|FILE_COMMON);
      FileWrite(filehnd,RDF.m_bufsize);
      FileClose(filehnd);

      filehnd=FileOpen("RDFNclasses"+_Symbol+(string)_Period+".txt",FILE_READ|FILE_WRITE|FILE_CSV|FILE_ANSI|FILE_COMMON);
      FileWrite(filehnd,RDF.m_nclasses); //THIS IS WHERE THE ERROR IS BEING THROWN.

How can I best resolve this?

Compile Time Error

Fig 1: A few of the errors thrown during compile time.