62 TMVA::PDEFoamTarget::PDEFoamTarget()
88 , fTarget(from.fTarget)
90 Log() <<
kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
102 std::vector<Float_t> tvalues = VarTransform(values);
103 std::vector<Float_t> targets = ev->
GetTargets();
108 SetCellElement(cell, 0, GetCellElement(cell, 0) + wt);
109 SetCellElement(cell, 1, GetCellElement(cell, 1) + wt * targets.at(fTarget));
120 for (
Long_t iCell = 0; iCell <= fLastCe; iCell++) {
121 if (!(fCells[iCell]->GetStat()))
124 Double_t n_ev = GetCellElement(fCells[iCell], 0);
125 Double_t tar = GetCellElement(fCells[iCell], 1);
128 SetCellElement(fCells[iCell], 0, tar / n_ev);
129 SetCellElement(fCells[iCell], 1, tar /
TMath::Sqrt(n_ev));
131 SetCellElement(fCells[iCell], 0, 0.0);
132 SetCellElement(fCells[iCell], 1, -1);
157 std::vector<Float_t> txvec(VarTransform(xvec));
160 if (!CellValueIsUndefined(cell)) {
163 return GetCellValue(cell, cv);
165 return kernel->
Estimate(
this, txvec, cv);
168 return GetAverageNeighborsValue(txvec,
kValue);
190 cell->
GetHcub(cellPosi, cellSize);
193 for (
Int_t dim = 0; dim < GetTotDim(); dim++) {
194 std::vector<Float_t> ntxvec(txvec);
199 ntxvec[dim] = cellPosi[dim] - xoffset;
200 left_cell = FindCell(ntxvec);
201 if (!CellValueIsUndefined(left_cell)) {
203 result += GetCellValue(left_cell, cv);
207 ntxvec[dim] = cellPosi[dim] + cellSize[dim] + xoffset;
208 right_cell = FindCell(ntxvec);
209 if (!CellValueIsUndefined(right_cell)) {
211 result += GetCellValue(right_cell, cv);
215 if (norm > 0) result /=
norm;
MsgLogger & Endl(MsgLogger &ml)
ClassImp(TMVA::PDEFoamTarget) TMVA
Default constructor for streamer, user should not use it.
Bool_t CellValueIsUndefined(PDEFoamCell *cell)
Returns true, if the target error equals -1, as set in Finalize() in case of no events in the cell...
std::vector< double > values
virtual void FillFoamCells(const Event *ev, Float_t wt)
This function fills an event into the discriminant PDEFoam.
virtual Float_t Estimate(PDEFoam *, std::vector< Float_t > &, ECellValue)=0
Float_t GetAverageNeighborsValue(std::vector< Float_t > &, ECellValue)
This function returns the average value 'cv' of only nearest neighbor cells.
std::vector< Float_t > & GetTargets()
virtual void Finalize()
Calculate average cell target in every cell and save them to the cell.
std::vector< Float_t > & GetValues()
Double_t Sqrt(Double_t x)
void GetHcub(PDEFoamVect &, PDEFoamVect &) const
Provides size and position of the cell These parameter are calculated by analyzing information in all...
double norm(double *x, double *p)
virtual Float_t GetCellValue(const std::vector< Float_t > &xvec, ECellValue cv, PDEFoamKernelBase *)
This function finds the cell, which corresponds to the given untransformed event vector 'xvec' and re...