70 , fTargetSelection(kMean)
97 , fTargetSelection(ts)
108 Log() << kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
131 std::map<Int_t, Float_t> txvec;
132 for (std::map<Int_t, Float_t>::const_iterator it = xvec.begin();
133 it != xvec.end(); ++it) {
134 Float_t coordinate = it->second;
135 Int_t dim = it->first;
138 if (coordinate <=
fXmin[dim])
140 else if (coordinate >=
fXmax[dim])
143 txvec.insert(std::pair<Int_t, Float_t>(dim,
VarTransform(dim, coordinate)));
147 std::map<Int_t, Float_t> target;
150 std::vector<PDEFoamCell*> cells =
FindCells(txvec);
154 return std::vector<Float_t>(
GetTotDim() - xvec.size(), 0);
160 if (txvec.find(idim) == txvec.end())
161 target.insert(std::pair<Int_t, Float_t>(idim, 0));
172 Log() <<
"<PDEFoamMultiTarget::GetCellValue>: " 173 <<
"unknown target selection type!" <<
Endl;
178 std::vector<Float_t>
result;
179 result.reserve(target.size());
180 for (std::map<Int_t, Float_t>::const_iterator it = target.begin();
181 it != target.end(); ++it)
182 result.push_back(it->second);
207 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
208 cell_it != cells.end(); ++cell_it) {
214 if (cell_density > max_dens) {
217 (*cell_it)->GetHcub(cellPosi, cellSize);
220 max_dens = cell_density;
223 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
224 target_it != target.end(); ++target_it) {
225 const Int_t dim = target_it->first;
251 std::map<Int_t, Float_t>
norm;
254 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
255 cell_it != cells.end(); ++cell_it) {
262 (*cell_it)->GetHcub(cellPosi, cellSize);
265 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
266 target_it != target.end(); ++target_it) {
267 const Int_t dim = target_it->first;
268 target_it->second += cell_density *
270 norm[dim] += cell_density;
275 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
276 target_it != target.end(); ++target_it) {
279 const Int_t dim = target_it->first;
283 target[dim] /= norm[dim];
MsgLogger & Endl(MsgLogger &ml)
This PDEFoam variant is used to estimate multiple targets by creating an event density foam (PDEFoamE...
Float_t VarTransform(Int_t idim, Float_t x) const
std::vector< TMVA::PDEFoamCell * > FindCells(const std::vector< Float_t > &) const
Find all cells, that contain txvec.
ETargetSelection fTargetSelection
virtual void CalculateMpv(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell *> &)
This function calculates the most probable target value from a given number of cells.
PDEFoamMultiTarget()
Default constructor for streamer, user should not use it.
This PDEFoam variant stores in every cell the sum of event weights and the sum of the squared event w...
Float_t VarTransformInvers(Int_t idim, Float_t x) const
virtual void CalculateMean(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell *> &)
This function calculates the mean target value from a given number of cells.
Abstract ClassifierFactory template that handles arbitrary types.
virtual std::vector< Float_t > GetCellValue(const std::map< Int_t, Float_t > &, ECellValue)
This function is overridden from PDFEFoam.
double norm(double *x, double *p)