87 const UInt_t nvars = fDataSetInfo.GetNVariables();
88 Log() << kINFO <<
"Number of variables before transformation: " << nvars <<
Endl;
89 std::vector<VariableInfo>& vars = fDataSetInfo.GetVariableInfos();
96 Log() << kINFO <<
"Selecting variables whose variance is above threshold value = " <<
threshold <<
Endl;
97 Int_t maxL = fDataSetInfo.GetVariableNameMaxLength();
99 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
100 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
"Selected Variables";
101 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(10) <<
"Variance" <<
Endl;
102 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
107 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) << vars[
ivar].GetExpression();
108 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
variance <<
Endl;
113 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
116 transformedLoader->PrepareTrainingAndTestTree(fDataLoader->GetDataSetInfo().GetCut(
"Signal"), fDataLoader->GetDataSetInfo().GetCut(
"Background"), fDataLoader->GetDataSetInfo().GetSplitOptions());
117 Log() << kINFO <<
"Number of variables after transformation: " <<
transformedLoader->GetDataSetInfo().GetNVariables() <<
Endl;
150 const std::vector<TMVA::Event*>& events = fDataSetInfo.GetDataSet()->GetEventCollection();
152 const UInt_t nvars = fDataSetInfo.GetNVariables();
154 std::vector<VariableInfo>& vars = fDataSetInfo.GetVariableInfos();
155 std::vector<VariableInfo>&
tars = fDataSetInfo.GetTargetInfos();
172 vars[
ivar].SetMin(
x);
173 vars[
ivar].SetMax(
x);
176 UpdateNorm(
ivar,
x );
178 x0(
ivar) +=
x*weight;
188 UpdateNorm( nvars+
itgt,
x );
190 x0(nvars+
itgt) +=
x*weight;
196 Log() << kFATAL <<
" the sum of event weights calculated for your input is == 0"
197 <<
" or exactly: " <<
sumOfWeights <<
" there is obviously some problem..."<<
Endl;
204 vars[
ivar].SetMean( mean );
206 Log() << kFATAL <<
" the RMS of your input variable " <<
ivar
208 <<
") .. sometimes related to a problem with outliers and negative event weights"
217 Log() << kFATAL <<
" the RMS of your target variable " <<
itgt
218 <<
" evaluates to an imaginary number: sqrt(" <<
x2(nvars+
itgt)/
sumOfWeights - mean*mean
219 <<
") .. sometimes related to a problem with outliers and negative event weights"
233 v0(
ivar) += weight*(
x-mean)*(
x-mean);
239 v0(nvars+
itgt) += weight*(
x-mean)*(
x-mean);
243 Int_t maxL = fDataSetInfo.GetVariableNameMaxLength();
245 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
246 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
"Variables";
247 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(10) <<
"Variance" <<
Endl;
248 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
251 Log() << std::setprecision(5);
255 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) << vars[
ivar].GetExpression();
256 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
variance <<
Endl;
259 maxL = fDataSetInfo.GetTargetNameMaxLength();
261 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
262 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
"Targets";
263 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(10) <<
"Variance" <<
Endl;
264 Log() << kINFO <<
"----------------------------------------------------------------" <<
Endl;
269 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
tars[
itgt].GetExpression();
270 Log() << kINFO << std::setiosflags(std::ios::left) << std::setw(
maxL) <<
variance <<
Endl;
273 Log() << kINFO <<
"Set minNorm/maxNorm for variables to: " <<
Endl;
274 Log() << std::setprecision(3);
276 Log() <<
" " << vars[
ivar].GetExpression()
277 <<
"\t: [" << vars[
ivar].GetMin() <<
"\t, " << vars[
ivar].GetMax() <<
"\t] " <<
Endl;
278 Log() << kINFO <<
"Set minNorm/maxNorm for targets to: " <<
Endl;
279 Log() << std::setprecision(3);
281 Log() <<
" " <<
tars[
itgt].GetExpression()
283 Log() << std::setprecision(5);