39 ClassImp(TMVA::SdivSqrtSplusB);
44 Double_t TMVA::SdivSqrtSplusB::GetSeparationIndex(
const Double_t s,
const Double_t b )
46 if (s+b > 0)
return s / TMath::Sqrt(s+b);
58 Double_t TMVA::SdivSqrtSplusB::GetSeparationGain(
const Double_t nSelS,
const Double_t nSelB,
59 const Double_t nTotS,
const Double_t nTotB)
61 if ( (nTotS-nSelS)==nSelS && (nTotB-nSelB)==nSelB)
return 0.;
63 Double_t parentIndex = (nTotS+nTotB) *this->GetSeparationIndex(nTotS,nTotB);
65 Double_t leftIndex = ( ((nTotS - nSelS) + (nTotB - nSelB))
66 * this->GetSeparationIndex(nTotS-nSelS,nTotB-nSelB) );
67 Double_t rightIndex = (nSelS+nSelB) * this->GetSeparationIndex(nSelS,nSelB);
70 Double_t diff = (parentIndex - leftIndex - rightIndex)/(nTotS+nTotB);
72 if(diff<fPrecisionCut ) {