53 #ifndef ROOT_TMVA_PDEFoamMultiTarget 64 , fTargetSelection(
kMean)
91 , fTargetSelection(ts)
102 Log() <<
kFATAL <<
"COPY CONSTRUCTOR NOT IMPLEMENTED" <<
Endl;
125 std::map<Int_t, Float_t> txvec;
126 for (std::map<Int_t, Float_t>::const_iterator it = xvec.begin();
127 it != xvec.end(); ++it) {
128 Float_t coordinate = it->second;
129 Int_t dim = it->first;
132 if (coordinate <=
fXmin[dim])
134 else if (coordinate >=
fXmax[dim])
137 txvec.insert(std::pair<Int_t, Float_t>(dim,
VarTransform(dim, coordinate)));
141 std::map<Int_t, Float_t> target;
144 std::vector<PDEFoamCell*> cells =
FindCells(txvec);
148 return std::vector<Float_t>(
GetTotDim() - xvec.size(), 0);
154 if (txvec.find(idim) == txvec.end())
155 target.insert(std::pair<Int_t, Float_t>(idim, 0));
166 Log() <<
"<PDEFoamMultiTarget::GetCellValue>: " 167 <<
"unknown target selection type!" <<
Endl;
172 std::vector<Float_t>
result;
173 result.reserve(target.size());
174 for (std::map<Int_t, Float_t>::const_iterator it = target.begin();
175 it != target.end(); ++it)
176 result.push_back(it->second);
200 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
201 cell_it != cells.end(); ++cell_it) {
207 if (cell_density > max_dens) {
210 (*cell_it)->GetHcub(cellPosi, cellSize);
213 max_dens = cell_density;
216 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
217 target_it != target.end(); ++target_it) {
218 const Int_t dim = target_it->first;
243 std::map<Int_t, Float_t>
norm;
246 for (std::vector<PDEFoamCell*>::const_iterator cell_it = cells.begin();
247 cell_it != cells.end(); ++cell_it) {
254 (*cell_it)->GetHcub(cellPosi, cellSize);
257 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
258 target_it != target.end(); ++target_it) {
259 const Int_t dim = target_it->first;
260 target_it->second += cell_density *
262 norm[dim] += cell_density;
267 for (std::map<Int_t, Float_t>::iterator target_it = target.begin();
268 target_it != target.end(); ++target_it) {
271 const Int_t dim = target_it->first;
275 target[dim] /= norm[dim];
MsgLogger & Endl(MsgLogger &ml)
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 *> &)
PDEFoamMultiTarget()
Default constructor for streamer, user should not use it.
Float_t VarTransformInvers(Int_t idim, Float_t x) const
virtual void CalculateMean(std::map< Int_t, Float_t > &, const std::vector< PDEFoamCell *> &)
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)