Changeset 8203


Ignore:
Timestamp:
11/02/06 09:00:59 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8202 r8203  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2006/11/02 Thomas Bretz
     22
     23   * datacenter/macros/fillstar.C:
     24     - changed such that no muon rates below 0 are entered into the DB
     25
     26   * mhcalib/MHCalibrationCam.cc:
     27     - reformatted and improved output
     28     - do not complain about empty lo-gain histograms (BTW:
     29       it should complain if the histogram should not be empty!)
     30
     31   * mranforest/MHRanForestGini.cc, mranforest/MRanForest.cc,
     32     mranforest/MRanForestCalc.cc, mranforest/MRanTree.cc:
     33     - small changes to output
     34     - changes to comments
     35
     36
    2037
    2138 2006/11/01 Daniela Dorner
     
    102119   * mcalib/MCalibrationRelTimeCalc.cc:
    103120     - reformatted some output
    104 
    105    * mhcalib/MHCalibrationCam.cc:
    106      - reformatted and improved output
    107      - do not complain about empty lo-gain histograms (BTW:
    108        it should complain if the histogram should not be empty!)
    109121
    110122   * mhcalib/MHCalibrationChargeCam.cc:
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r8170 r8203  
    185185    Float_t mrate  = num/effon;
    186186    mrate = TMath::Nint(mrate*100)/100.;
     187    if (mrate<0)
     188        mrate=0;
    187189    TString muonrate = Form("%6.2f", mrate);
    188190    Int_t effontime = TMath::Nint(effon);
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r8148 r8203  
    12571257                                      MBadPixelsPix::UncalibratedType_t osctyp)
    12581258{
    1259 
    1260   if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow())
    1261     {
    1262       *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId()
    1263             << ": Only over- or underflow in hi-gain." << endl;
     1259  if (hist.IsEmpty())
     1260  {
     1261      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram empty." << endl;
    12641262      return;
    1265     } 
     1263  }
     1264  if (hist.IsOnlyOverflow())
     1265  {
     1266      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only overflows." << endl;
     1267      return;
     1268  }
     1269  if (hist.IsOnlyUnderflow())
     1270  {
     1271      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Hi-Gain histogram contains only underflows." << endl;
     1272      return;
     1273  }
     1274
    12661275  //
    12671276  // 2) Fit the Hi Gain histograms with a Gaussian
     
    13501359{
    13511360
    1352   if (hist.IsEmpty() || hist.IsOnlyOverflow() || hist.IsOnlyUnderflow())
    1353     {
    1354       *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId()
    1355             << ": Only over- or underflow in lo-gain." << endl;
     1361  if (hist.IsEmpty())
     1362  {
     1363      // *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram empty." << endl;
    13561364      return;
    1357     } 
     1365  }
     1366  if (hist.IsOnlyOverflow())
     1367  {
     1368      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only overflows." << endl;
     1369      return;
     1370  }
     1371  if (hist.IsOnlyUnderflow())
     1372  {
     1373      *fLog << warn << "Pixel   " << setw(4) << pix.GetPixId() << ": Lo-Gain histogram contains only underflows." << endl;
     1374      return;
     1375  }
     1376
    13581377  //
    13591378  // 2) Fit the Hi Gain histograms with a Gaussian
  • trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc

    r7425 r8203  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHRanForestGini.cc,v 1.7 2006-11-02 08:57:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    1719!
    1820!   Author(s): Thomas Hengstebeck 3/2003 <mailto:hengsteb@alwa02.physik.uni-siegen.de>
    19 !
    20 !   Copyright: MAGIC Software Development, 2000-2003
     21!   Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de>
     22!
     23!   Copyright: MAGIC Software Development, 2000-2006
    2124!
    2225!
     
    134137    // --- Produce some text information ---
    135138    fRules.AddText("");
    136     fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d events",
     139    fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d evts",
    137140                        fRanForest->IsClassify()?"Classification":"Regression",
    138141                        fRanForest->GetNumTrees(),
  • trunk/MagicSoft/Mars/mranforest/MRanForest.cc

    r8022 r8203  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MRanForest.cc,v 1.26 2006-11-02 08:57:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    1719!
    1820!   Author(s): Thomas Hengstebeck 3/2003 <mailto:hengsteb@physik.hu-berlin.de>
     21!   Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de>
    1922!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     23!   Copyright: MAGIC Software Development, 2000-2006
    2124!
    2225!
     
    498501    // error-estimates from out-of-bag data (oob data):
    499502    //
    500     // For a single tree the events not(!) contained in the bootstrap sample of
    501     // this tree can be used to obtain estimates for the classification error of
    502     // this tree.
    503     // If you take a certain event, it is contained in the oob-data of 1/3 of
    504     // the trees (see comment to ModifyData). This means that the classification error
    505     // determined from oob-data is underestimated, but can still be taken as upper limit.
    506 
     503    // For a single tree the events not(!) contained in the bootstrap
     504    // sample of this tree can be used to obtain estimates for the
     505    // classification error of this tree.
     506    // If you take a certain event, it is contained in the oob-data of
     507    // 1/3 of the trees (see comment to ModifyData). This means that the
     508    // classification error determined from oob-data is underestimated,
     509    // but can still be taken as upper limit.
    507510    Int_t ninbag = 0;
    508511    for (Int_t ievt=0;ievt<numdata;ievt++)
     
    584587        TMath::Sort(numdata,v.GetArray(),isort.GetArray(),kFALSE);
    585588
    586         // this sorts the v[n] in ascending order. isort[n] is the event number
    587         // of that v[n], which is the n-th from the lowest (assume the original
    588         // event numbers are 0,1,...).
     589        // this sorts the v[n] in ascending order. isort[n] is the
     590        // event number of that v[n], which is the n-th from the
     591        // lowest (assume the original event numbers are 0,1,...).
    589592
    590593        // control sorting
     
    608611            const Int_t n2=isort[n+1];
    609612
    610             // FIXME: Copying isort[n] to fDataSort[mvar*numdata] can be accelerated!
     613            // FIXME: Copying isort[n] to fDataSort[mvar*numdata]
     614            // can be accelerated!
    611615            fDataSort[mvar*numdata+n]=n1;
    612616            if(n==0) fDataRang[mvar*numdata+n1]=0;
  • trunk/MagicSoft/Mars/mranforest/MRanForestCalc.cc

    r8171 r8203  
    1 /* ================================q======================================== *\
     1/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MRanForestCalc.cc,v 1.25 2006-11-02 08:57:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    1921!   Author(s): Thomas Bretz 8/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    2022!
    21 !   Copyright: MAGIC Software Development, 2000-2005
     23!   Copyright: MAGIC Software Development, 2000-2006
    2224!
    2325!
  • trunk/MagicSoft/Mars/mranforest/MRanTree.cc

    r7804 r8203  
    8383void MRanTree::SetNdSize(Int_t n)
    8484{
    85     // threshold nodesize of terminal nodes, i.e. the training data is splitted
    86     // until there is only pure date in the subsets(=terminal nodes) or the
    87     // subset size is LE n
     85    // threshold nodesize of terminal nodes, i.e. the training data is
     86    // splitted until there is only pure date in the subsets(=terminal
     87    // nodes) or the subset size is LE n
    8888
    8989    fNdSize=TMath::Max(1,n);//at least 1 event per node
     
    163163    const Int_t mdim = fGiniDec.GetSize();
    164164
    165     // For the best split, msplit is the index of the variable (e.g Hillas par.,
    166     // zenith angle ,...)
    167     // split on. decsplit is the decreae in impurity measured by Gini-index.
    168     // nsplit is the case number of value of msplit split on,
     165    // For the best split, msplit is the index of the variable (e.g
     166    // Hillas par., zenith angle ,...)
     167    // split on. decsplit is the decreae in impurity measured by
     168    // Gini-index. nsplit is the case number of value of msplit split on,
    169169    // and nsplitnext is the case number of the next larger value of msplit.
    170170
     
    287287    const Int_t mdim = fGiniDec.GetSize();
    288288
    289     // For the best split, msplit is the index of the variable (e.g Hillas par., zenith angle ,...)
    290     // split on. decsplit is the decreae in impurity measured by Gini-index.
    291     // nsplit is the case number of value of msplit split on,
    292     // and nsplitnext is the case number of the next larger value of msplit.
     289    // For the best split, msplit is the index of the variable (e.g
     290    // Hillas par., zenith angle ,...) split on. decsplit is the decreae
     291    // in impurity measured by Gini-index. nsplit is the case number of
     292    // value of msplit split on, and nsplitnext is the case number of
     293    // the next larger value of msplit.
    293294
    294295    Int_t nbestvar=0;
     
    429430                        Int_t nbest,Int_t &ndendl)
    430431{
    431     // This is the heart of the BuildTree construction. Based on the best split
    432     // the data in the part of datasort corresponding to the current node is moved to the
    433     // left if it belongs to the left child and right if it belongs to the right child-node.
     432    // This is the heart of the BuildTree construction. Based on the
     433    // best split the data in the part of datasort corresponding to
     434    // the current node is moved to the left if it belongs to the left
     435    // child and right if it belongs to the right child-node.
    434436    const Int_t numdata = ncase.GetSize();
    435437    const Int_t mdim    = fGiniDec.GetSize();
     
    478480                         Int_t ninbag, const int nclass)
    479481{
    480     // Buildtree consists of repeated calls to two void functions, FindBestSplit and MoveData.
    481     // Findbestsplit does just that--it finds the best split of the current node.
    482     // MoveData moves the data in the split node right and left so that the data
    483     // corresponding to each child node is contiguous.
     482    // Buildtree consists of repeated calls to two void functions,
     483    // FindBestSplit and MoveData. Findbestsplit does just that--it finds
     484    // the best split of the current node. MoveData moves the data in
     485    // the split node right and left so that the data corresponding to
     486    // each child node is contiguous.
    484487    //
    485488    // buildtree bookkeeping:
    486     // ncur is the total number of nodes to date.  nodestatus(k)=1 if the kth node has been split.
    487     // nodestatus(k)=2 if the node exists but has not yet been split, and =-1 if the node is
    488     // terminal.  A node is terminal if its size is below a threshold value, or if it is all
    489     // one class, or if all the data-values are equal.  If the current node k is split, then its
    490     // children are numbered ncur+1 (left), and ncur+2(right), ncur increases to ncur+2 and
    491     // the next node to be split is numbered k+1.  When no more nodes can be split, buildtree
    492     // returns.
     489    // ncur is the total number of nodes to date.  nodestatus(k)=1 if
     490    // the kth node has been split. nodestatus(k)=2 if the node exists
     491    // but has not yet been split, and =-1 if the node is terminal.
     492    // A node is terminal if its size is below a threshold value, or
     493    // if it is all one class, or if all the data-values are equal.
     494    // If the current node k is split, then its children are numbered
     495    // ncur+1 (left), and ncur+2(right), ncur increases to ncur+2 and
     496    // the next node to be split is numbered k+1.  When no more nodes
     497    // can be split, buildtree returns.
    493498    const Int_t mdim    = fGiniDec.GetSize();
    494499    const Int_t nrnodes = fBestSplit.GetSize();
Note: See TracChangeset for help on using the changeset viewer.