Changeset 7725 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/22/06 14:42:06 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7724 r7725  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2006/05/22 Thomas Bretz
     22
     23   * mranforest/MRanTree.cc:
     24     - replaced some arbitrary small and large values by FLT_MAX in
     25       FindBestSpllit*
     26     - replaced in FindBestSpllit* a sanity check for rld and rrd (do
     27       not divide by zero) by a check whether the result (crit) is finite
     28
     29
    2030
    2131 2006/05/21 Thomas Bretz
  • trunk/MagicSoft/Mars/mranforest/MRanTree.cc

    r7710 r7725  
    207207        MArrayF wr(tclasspop);  // right node//nclass
    208208
    209         Double_t critvar=-1.0e20;
     209        Double_t critvar=-FLT_MAX;
    210210        for(Int_t nsp=ndstart;nsp<=ndend-1;nsp++)
    211211        {
     
    248248
    249249            // If crit starts to become pretty large do WHAT???
    250             if (TMath::Min(rrd,rld)<=1.0e-5) // FIXME: CHECKIT FOR WEIGHTS!
     250            //if (TMath::Min(rrd,rld)<=1.0e-5) // FIXME: CHECKIT FOR WEIGHTS!
     251            //    continue;
     252
     253            const Double_t crit=(rln/rld)+(rrn/rrd);
     254            if (TMath::Finite(crit))
    251255                continue;
    252 
    253             const Double_t crit=(rln/rld)+(rrn/rrd);
    254256
    255257            // Search for the highest value of crit
     
    320322    // start main loop through variables to find best split,
    321323
    322     Double_t critmin=1.0e40;
     324    Double_t critmin=FLT_MAX;
    323325
    324326    // random split selection, number of trials = fNumTry
     
    399401                continue;
    400402
    401             if (TMath::Min(rrd,rld)<=1.0e-5)
     403            //if (TMath::Min(rrd,rld)<=1.0e-5)
     404            //    continue;
     405
     406            const Double_t crit=(rln/rld)+(rrn/rrd);
     407            if (TMath::Finite(crit))
    402408                continue;
    403 
    404             const Double_t crit=(rln/rld)+(rrn/rrd);
    405409
    406410            if (crit>=critvar) continue;
Note: See TracChangeset for help on using the changeset viewer.