63 fAchievableEff(
dsi->GetNClasses()),
64 fAchievablePur(
dsi->GetNClasses()),
65 fBestCuts(
dsi->GetNClasses(),std::vector<
Double_t>(
dsi->GetNClasses()))
81 if (
ievt >= (
Int_t)fMultiClassValues.size()) fMultiClassValues.resize(
ievt+1 );
93 ds->SetCurrentType(GetTreeType());
104 mat(
iRow,
iCol) = std::numeric_limits<double>::quiet_NaN();
139 ds->SetCurrentType( GetTreeType() );
175 if (
effTimesPur > std::numeric_limits<float>::min())
178 fAchievableEff.at(fClassToOptimize) =
eff;
179 fAchievablePur.at(fClassToOptimize) =
pur;
191 Log() << kINFO <<
"Calculating best set of cuts for class "
195 std::vector<Interval*> ranges(
dsi->GetNClasses(),
new Interval(-1,1));
197 fClassSumWeights.clear();
198 fEventWeights.clear();
199 fEventClasses.clear();
202 fClassSumWeights.push_back(0);
208 fClassSumWeights[
ev->GetClass()] +=
ev->GetWeight();
209 fEventWeights.push_back(
ev->GetWeight());
210 fEventClasses.push_back(
ev->GetClass());
217 std::vector<Double_t>
result;
223 for( std::vector<Double_t>::iterator it =
result.begin(); it<
result.end(); ++it ){
224 Log() << kINFO <<
" cutValue[" <<
dsi->GetClassInfo(
n )->GetName() <<
"] = " << (*it) <<
";"<<
Endl;
243 Log() << kINFO <<
"Creating multiclass performance histograms..." <<
Endl;
246 ds->SetCurrentType(GetTreeType());
251 std::vector<std::vector<Float_t>> *
rawMvaRes = GetValueVector();
263 if ( DoesExist(
name) ) {
268 std::vector<Float_t>
mvaRes;
313 std::vector<Float_t>
mvaRes;
356 Log() << kINFO <<
"Creating multiclass response histograms..." <<
Endl;
359 ds->SetCurrentType( GetTreeType() );
362 std::vector<std::vector<TH1F*> >
histos;
366 histos.push_back(std::vector<TH1F*>(0));
369 dsi->GetClassInfo(
jCls )->GetName(),
370 dsi->GetClassInfo(
iCls )->GetName());
373 if ( DoesExist(
name) ) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
static char * Format(const char *format, va_list ap)
Format a string in a circular formatting buffer (using a printf style format descriptor).
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a float per channel (see TH1 documentation)
Class that contains all the data information.
Class that contains all the data information.
Fitter using a Genetic Algorithm.
Double_t Run(std::vector< Double_t > &pars)
Execute fitting.
Interface for a fitter 'target'.
The TMVA::Interval Class.
ostringstream derivative to redirect and format output
TMatrixD GetConfusionMatrix(Double_t effB)
Returns a confusion matrix where each class is pitted against each other.
Double_t EstimatorFunction(std::vector< Double_t > &) override
std::vector< Double_t > GetBestMultiClassCuts(UInt_t targetClass)
calculate the best working point (optimal cut values) for the multiclass classifier
ResultsMulticlass(const DataSetInfo *dsi, TString resultsName)
constructor
void CreateMulticlassHistos(TString prefix, Int_t nbins, Int_t nbins_high)
this function fills the mva response histos for multiclass classification
~ResultsMulticlass()
destructor
void CreateMulticlassPerformanceHistos(TString prefix)
Create performance graphs for this classifier a multiclass setting.
void SetValue(std::vector< Float_t > &value, Int_t ievt)
Class that is the base-class for a vector of result.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
MsgLogger & Endl(MsgLogger &ml)