#include <cstdlib>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <limits>
#include "TFile.h"
#include "TTree.h"
Go to the source code of this file.
|
void | Produce_ROC (std::vector< ClassifierOutPuts > &input, std::string const &SigName, std::string const &BgName, size_t sigCnt, size_t bgCnt, std::vector< ROCPoints > &Roc) |
|
void | print (std::vector< ClassifierOutPuts > const &OutPutList) |
|
void | print (std::map< std::string, float > const &ClsMapOut) |
|
std::map< std::string, size_t > * | readEvents (char const *infile, std::vector< std::string > const &varNames, std::vector< std::string > const &classNames, std::vector< std::pair< std::string, std::vector< float > * > > &Outcontainer) |
|
void | printRoc (std::vector< ROCPoints > const &RocList) |
|
void | WriteRocToFile (std::string const &FileName, std::vector< ROCPoints > const &RocList) |
|
Print the list of classifier outputs.
- Parameters
-
OutPutList | The list of outputs created by a classifier. |
Print the output map.
- Parameters
-
ClsMapOut | The map to print. |
void printRoc |
( |
std::vector< ROCPoints > const & |
RocList | ) |
|
Print list of ROC objects.
- Parameters
-
RocList | The list of ROC points |
void Produce_ROC |
( |
std::vector< ClassifierOutPuts > & |
input, |
|
|
std::string const & |
SigName, |
|
|
std::string const & |
BgName, |
|
|
size_t |
sigCnt, |
|
|
size_t |
bgCnt, |
|
|
std::vector< ROCPoints > & |
Roc |
|
) |
| |
Function to produce ROC curve. This will work if the classifier can produce probs or scores.
- Parameters
-
input | Vector containing classifier outputs for a given test data set. Note that this parameter will be modified (sorted). |
SigName | Signal name. |
BgName | Background name. |
sigCnt | Number of signal events. |
bgCnt | Number of background events. |
Roc | The list of ROC points (output var). |
std::map<std::string, size_t>* readEvents |
( |
char const * |
infile, |
|
|
std::vector< std::string > const & |
varNames, |
|
|
std::vector< std::string > const & |
classNames, |
|
|
std::vector< std::pair< std::string, std::vector< float > * > > & |
Outcontainer |
|
) |
| |
Reads the event data from the inputfile.
- Parameters
-
inFile | The input file. |
varNames | Name of the parameters (branches per tree). |
classNames | Name of the labels to read. |
Outcontainer | Output is stored here. |
void WriteRocToFile |
( |
std::string const & |
FileName, |
|
|
std::vector< ROCPoints > const & |
RocList |
|
) |
| |
Write the list of ROC objects in a file.
- Parameters
-
FileName | The name of the file to write into. |
RocList | The list of the ROC poits to write. |