53 fLogger( new
MsgLogger(
Form(
"ResultsRegression%s",resultsName.Data()) , kINFO) )
69 if (ievt >= (
Int_t)fRegValues.size()) fRegValues.resize( ievt+1 );
70 fRegValues[ievt] = value;
78 ds->SetCurrentType( GetTreeType() );
87 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
88 const Event* ev = ds->GetEvent(ievt);
89 std::vector<Float_t> regVal = fRegValues.at(ievt);
99 h->GetXaxis()->SetTitle(
"Quadratic Deviation");
100 h->GetYaxis()->SetTitle(
"Weighted Entries");
102 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
103 const Event* ev = ds->GetEvent(ievt);
104 std::vector<Float_t> regVal = fRegValues.at(ievt);
108 if (!truncate || val<=truncvalue )
h->Fill( val, weight);
118 ds->SetCurrentType( GetTreeType() );
133 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
134 const Event* ev = ds->GetEvent(ievt);
147 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
148 const Event* ev = ds->GetEvent(ievt);
159 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
160 const Event* ev = ds->GetEvent(ievt);
161 std::vector<Float_t> regVal = fRegValues.at(ievt);
186 h->GetYaxis()->SetTitle( yName );
188 for (
Int_t ievt=0; ievt<ds->GetNEvents(); ievt++) {
189 const Event* ev = ds->GetEvent(ievt);
190 std::vector<Float_t> regVal = fRegValues.at(ievt);
195 h->Fill( xVal, yVal );
205 Log() << kINFO <<
"Create variable histograms" <<
Endl;
210 TH2F*
h = DeviationAsAFunctionOf( ivar, itgt );
217 Log() << kINFO <<
"Create regression target histograms" <<
Endl;
228 Log() << kINFO <<
"Create regression average deviation" <<
Endl;
230 TH1F*
h = QuadraticDeviation(itgt);
235 h->GetQuantiles(1,yq,xq);
238 TH1F* htrunc = QuadraticDeviation(itgt,
true, yq[0]);
239 TString name2(
Form(
"%s_Quadr_Dev_best90perc_target_%d_",prefix.
Data(),itgt) );
244 Log() << kINFO <<
"Results created" <<
Endl;
char * Form(const char *fmt,...)
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void SetName(const char *name)
Change the name of this histogram.
2-D histogram with a float per channel (see TH1 documentation)}
Class that contains all the data information.
UInt_t GetNVariables() const
UInt_t GetNTargets() const
VariableInfo & GetVariableInfo(Int_t i)
VariableInfo & GetTargetInfo(Int_t i)
Class that contains all the data information.
Float_t GetValue(UInt_t ivar) const
return value of i'th variable
Double_t GetWeight() const
return the event weight - depending on whether the flag IgnoreNegWeightsInTraining is or not.
Float_t GetTarget(UInt_t itgt) const
ostringstream derivative to redirect and format output
void SetValue(std::vector< Float_t > &value, Int_t ievt)
TH2F * DeviationAsAFunctionOf(UInt_t varNum, UInt_t tgtNum)
TH1F * QuadraticDeviation(UInt_t tgtNum, Bool_t truncate=false, Double_t truncvalue=0.)
void CreateDeviationHistograms(TString prefix)
~ResultsRegression()
destructor
ResultsRegression(const DataSetInfo *dsi, TString resultsName)
constructor
Class that is the base-class for a vector of result.
Class for type info of MVA input variable.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
MsgLogger & Endl(MsgLogger &ml)