Changeset 7535 for trunk/MagicSoft/Mars/mranforest
- Timestamp:
- 02/27/06 11:44:49 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mranforest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mranforest/MRanForest.cc
r7425 r7535 164 164 //at least 1 tree 165 165 fNumTrees=TMath::Max(n,1); 166 fTreeHad.Set(fNumTrees);167 fTreeHad.Reset();168 166 } 169 167 … … 250 248 // classes directly given 251 249 for (Int_t j=0;j<numdata;j++) 252 fClass[j] = int(fHadTrue[j]+0.5);250 fClass[j] = TMath::Nint(fHadTrue[j]); 253 251 } 254 252 } … … 264 262 Double_t MRanForest::CalcHadroness(const TVector &event) 265 263 { 264 fTreeHad.Set(fNumTrees); 265 266 266 Double_t hadroness=0; 267 Int_t ntree=0;267 Int_t ntree =0; 268 268 269 269 TIter Next(fForest); … … 341 341 // setup rules to be used for classification/regression 342 342 const MDataArray *allrules=(MDataArray*)mat->GetColumns(); 343 if (allrules==NULL)343 if (allrules==NULL) 344 344 { 345 345 *fLog << err <<"Rules of matrix == null, exiting"<< endl; … … 347 347 } 348 348 349 if (allrules->GetNumEntries()!=dim+1) 350 { 351 *fLog << err <<"Rules of matrix " << allrules->GetNumEntries() << " mismatch dimension+1 " << dim+1 << "...exiting."<< endl; 352 return kFALSE; 353 } 354 349 355 if (fRules) 350 356 delete fRules; 357 351 358 fRules = new MDataArray(); 352 359 fRules->Reset(); -
trunk/MagicSoft/Mars/mranforest/MRanForest.h
r7425 r7535 61 61 62 62 // estimates for classification error of growing forest 63 TArrayD fTreeHad; // Hadronness values63 TArrayD fTreeHad; //! Hadronness values (buffer for MHRanForest) 64 64 65 65 Double_t fUserVal; // A user value describing this tree (eg E-mc) -
trunk/MagicSoft/Mars/mranforest/MRanForestGrow.h
r7398 r7535 34 34 MRanForestGrow(const char *name=NULL, const char *title=NULL); 35 35 36 MRanForest *GetForest() const { return fRanForest; } 37 36 38 // void SetNumTrees(Int_t n=-1) { fNumTrees=n>0?n:100; } 37 39 // void SetNumTry(Int_t n=-1) { fNumTry =n>0?n: 3; }
Note:
See TracChangeset
for help on using the changeset viewer.