Changeset 8203 for trunk/MagicSoft
- Timestamp:
- 11/02/06 09:00:59 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8202 r8203 18 18 19 19 -*-*- 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 20 37 21 38 2006/11/01 Daniela Dorner … … 102 119 * mcalib/MCalibrationRelTimeCalc.cc: 103 120 - reformatted some output 104 105 * mhcalib/MHCalibrationCam.cc:106 - reformatted and improved output107 - do not complain about empty lo-gain histograms (BTW:108 it should complain if the histogram should not be empty!)109 121 110 122 * mhcalib/MHCalibrationChargeCam.cc: -
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r8170 r8203 185 185 Float_t mrate = num/effon; 186 186 mrate = TMath::Nint(mrate*100)/100.; 187 if (mrate<0) 188 mrate=0; 187 189 TString muonrate = Form("%6.2f", mrate); 188 190 Int_t effontime = TMath::Nint(effon); -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r8148 r8203 1257 1257 MBadPixelsPix::UncalibratedType_t osctyp) 1258 1258 { 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; 1264 1262 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 1266 1275 // 1267 1276 // 2) Fit the Hi Gain histograms with a Gaussian … … 1350 1359 { 1351 1360 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; 1356 1364 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 1358 1377 // 1359 1378 // 2) Fit the Hi Gain histograms with a Gaussian -
trunk/MagicSoft/Mars/mranforest/MHRanForestGini.cc
r7425 r8203 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHRanForestGini.cc,v 1.7 2006-11-02 08:57:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 17 19 ! 18 20 ! 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 21 24 ! 22 25 ! … … 134 137 // --- Produce some text information --- 135 138 fRules.AddText(""); 136 fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d ev ents",139 fRules.AddText(Form("%s w/ %d trees of node size %d trained by %d evts", 137 140 fRanForest->IsClassify()?"Classification":"Regression", 138 141 fRanForest->GetNumTrees(), -
trunk/MagicSoft/Mars/mranforest/MRanForest.cc
r8022 r8203 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MRanForest.cc,v 1.26 2006-11-02 08:57:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 17 19 ! 18 20 ! Author(s): Thomas Hengstebeck 3/2003 <mailto:hengsteb@physik.hu-berlin.de> 21 ! Author(s): Thomas Bretz <mailto:tbretz@astro.uni-wuerzburg.de> 19 22 ! 20 ! Copyright: MAGIC Software Development, 2000-200 523 ! Copyright: MAGIC Software Development, 2000-2006 21 24 ! 22 25 ! … … 498 501 // error-estimates from out-of-bag data (oob data): 499 502 // 500 // For a single tree the events not(!) contained in the bootstrap sample of501 // this tree can be used to obtain estimates for the classification error of502 // this tree.503 // If you take a certain event, it is contained in the oob-data of 1/3 of504 // the trees (see comment to ModifyData). This means that the classification error505 // 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. 507 510 Int_t ninbag = 0; 508 511 for (Int_t ievt=0;ievt<numdata;ievt++) … … 584 587 TMath::Sort(numdata,v.GetArray(),isort.GetArray(),kFALSE); 585 588 586 // this sorts the v[n] in ascending order. isort[n] is the event number587 // of that v[n], which is the n-th from the lowest (assume the original588 // 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,...). 589 592 590 593 // control sorting … … 608 611 const Int_t n2=isort[n+1]; 609 612 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! 611 615 fDataSort[mvar*numdata+n]=n1; 612 616 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 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 19 21 ! Author(s): Thomas Bretz 8/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 20 22 ! 21 ! Copyright: MAGIC Software Development, 2000-200 523 ! Copyright: MAGIC Software Development, 2000-2006 22 24 ! 23 25 ! -
trunk/MagicSoft/Mars/mranforest/MRanTree.cc
r7804 r8203 83 83 void MRanTree::SetNdSize(Int_t n) 84 84 { 85 // threshold nodesize of terminal nodes, i.e. the training data is splitted86 // until there is only pure date in the subsets(=terminal nodes) or the87 // subset size is LE n85 // 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 88 88 89 89 fNdSize=TMath::Max(1,n);//at least 1 event per node … … 163 163 const Int_t mdim = fGiniDec.GetSize(); 164 164 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, 169 169 // and nsplitnext is the case number of the next larger value of msplit. 170 170 … … 287 287 const Int_t mdim = fGiniDec.GetSize(); 288 288 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. 293 294 294 295 Int_t nbestvar=0; … … 429 430 Int_t nbest,Int_t &ndendl) 430 431 { 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. 434 436 const Int_t numdata = ncase.GetSize(); 435 437 const Int_t mdim = fGiniDec.GetSize(); … … 478 480 Int_t ninbag, const int nclass) 479 481 { 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. 484 487 // 485 488 // 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. 493 498 const Int_t mdim = fGiniDec.GetSize(); 494 499 const Int_t nrnodes = fBestSplit.GetSize();
Note:
See TracChangeset
for help on using the changeset viewer.