71 ClassImp(TMVA::SeparationBase);
76 TMVA::SeparationBase::SeparationBase() :
78 fPrecisionCut(TMath::Sqrt(std::numeric_limits<double>::epsilon()))
86 TMVA::SeparationBase::SeparationBase(
const SeparationBase& s ) :
88 fPrecisionCut(TMath::Sqrt(std::numeric_limits<double>::epsilon()))
101 Double_t TMVA::SeparationBase::GetSeparationGain(
const Double_t nSelS,
const Double_t nSelB,
102 const Double_t nTotS,
const Double_t nTotB)
104 if ( (nTotS-nSelS)==nSelS && (nTotB-nSelB)==nSelB)
return 0.;
113 Double_t parentIndex = this->GetSeparationIndex(nTotS,nTotB);
115 Double_t leftIndex = ( ((nTotS - nSelS) + (nTotB - nSelB))/(nTotS+nTotB)
116 * this->GetSeparationIndex(nTotS-nSelS,nTotB-nSelB) );
117 Double_t rightIndex = (nSelS+nSelB)/(nTotS+nTotB) * this->GetSeparationIndex(nSelS,nSelB);
119 Double_t diff = parentIndex - leftIndex - rightIndex;
122 if(diff<fPrecisionCut ) {