Changeset 1871 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/27/03 13:42:00 (22 years ago)
Author:
hengsteb
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/RanForest.C

    r1859 r1871  
    103103
    104104    MRanForestGrow rfgrow2;
    105     rfgrow2.SetNumTrees(50);
     105    rfgrow2.SetNumTrees(10);
    106106    rfgrow2.SetNumTry(3);
    107     rfgrow2.SetNdSize(1);
     107    rfgrow2.SetNdSize(10);
    108108
    109109    MWriteRootFile rfwrite2("RF.root");
     
    114114    tlist2.AddToList(&rfwrite2);
    115115    tlist2.AddToList(&fillh2);
     116
     117    // gRandom is accessed from MRanForest (-> bootstrap aggregating)
     118    // and MRanTree (-> random split selection) and should be initialized
     119    // here if you want to set a certain random number generator
     120    if(gRandom)
     121        delete gRandom;
     122    gRandom = new TRandom3(0);
    116123
    117124    //
  • trunk/MagicSoft/Mars/manalysis/MRanForest.cc

    r1870 r1871  
    226226    {
    227227        if(!gRandom)
    228             gRandom=new TRandom3(0);
     228        {
     229            *fLog << err << dbginf << "gRandom not initialized... aborting." << endl;
     230            return kFALSE;
     231        }
     232
    229233        Int_t k=Int_t(fNumData*gRandom->Rndm());
    230234
  • trunk/MagicSoft/Mars/manalysis/MRanTree.cc

    r1870 r1871  
    4141#include "MDataArray.h"
    4242
     43#include "MLog.h"
     44#include "MLogManip.h"
     45
    4346ClassImp(MRanTree);
    4447
     
    178181
    179182    // random split selection, number of trials = fNumTry
     183    if(!gRandom)
     184    {
     185        *fLog << err << dbginf << "gRandom not initialized... aborting." << endl;
     186        return kFALSE;
     187    }
    180188    for(Int_t mt=0;mt<fNumTry;mt++)
    181189    {
Note: See TracChangeset for help on using the changeset viewer.