Number of Restarts

  • szack

    szack - 2007-05-22


    Referring to StaticStructLearn learning engine example below,

    CMlStaticStructLearn *pLearn = CMlStaticStructLearnHC::Create(bnet, itStructLearnML, StructLearnHC, BIC, 2, vA, vD, 1);

    In the above, nRestarts is 1 and from the manual "nRestarts is Flag of hill-climbing search procedure restart with random initial structures. If it equals to 1 the procedure does not restart."

    Is it possible to set the nRestarts to more than 1? Because I only found the function LearnInOneStart in pnlMIStaticStructLEarnHC.cpp. There are no functions that refer to more than 1 restart.

    Thanks for any feedback. 


    • Alexandru Niculescu-Mizil

      The function Learn in pnlMIStaticStructLEarnHC.cpp actually handles the multiple restarts. For each restart it calls the LearnInOneStart function with a random initial DAG (except for the first restart where the initial DAG is the specified one), then it returns the highest scoring solution among all the restart. So yes, it is posible to set nRestarts to more than one.

    • szack

      szack - 2007-05-22

      Thanks Alex for the prompt and clear reply. I appreciate it very much!

    • szack

      szack - 2007-05-22


      I have tried setting restarts to 100 and i did the learning under PNLHigh(by changing the restart in Bnet.cpp) . Upon viewing the resulting network, I found that the network learned by 100 restarts is the same as the network learned by 1 restart. I thought that by doing more restarts in learning, I should be getting a diferent network. I am a bit confused and would appreciate any explanation regarding this.


      • Denver Dash

        Denver Dash - 2007-05-22

        How big was your network (number of nodes and number of arcs)?  It's possible if either the network or the data was very simple in some sense that after 1 iteration the algorithm found the global maximum.

    • szack

      szack - 2007-05-23

      My network has 38 nodes with 3 states each(-1,0,1). Max number of parents is set to 10. These facts seem to correspond to Denver's explanation. Thanks for the explanation.

      p/s- Can we have an updated version of the current Reference Manual? I think there a lot more functions in the library which is not explanied in the Reference Manual. For instance the function UpdateStatisticsML(class TAbularDistribFun (as was mentioned in my other post)


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks