#include <MVATrainer.h>
Classes | |
struct | CalibratedProcessor |
Public Member Functions | |
TrainerMonitoring::Module * | bookMonitor (const std::string &name) |
void | doneTraining (Calibration::MVAComputer *trainCalibration) const |
Calibration::MVAComputer * | getCalibration () const |
const std::string & | getName () const |
Calibration::MVAComputer * | getTrainCalibration () const |
void | loadState () |
MVATrainer (const std::string &fileName, bool useXSLT=false, const char *styleSheet=0) | |
void | saveState () |
void | setAutoSave (bool autoSave) |
void | setCleanup (bool cleanup) |
void | setCrossValidation (double split) |
void | setMonitoring (bool monitoring) |
void | setRandomSeed (UInt_t seed) |
std::string | trainFileName (const TrainProcessor *proc, const std::string &ext, const std::string &arg="") const |
~MVATrainer () | |
Static Public Attributes | |
static const AtomicId | kTargetId |
static const AtomicId | kWeightId |
Private Member Functions | |
void | connectProcessors (Calibration::MVAComputer *calib, const std::vector< CalibratedProcessor > &procs, bool withTarget) const |
SourceVariable * | createVariable (Source *source, AtomicId name, Variable::Flags flags) |
void | fillInputVars (SourceVariableSet &vars, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *xml) |
void | fillOutputVars (SourceVariableSet &vars, Source *source, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *xml) |
std::vector< AtomicId > | findFinalProcessors () const |
void | findUntrainedComputers (std::vector< AtomicId > &compute, std::vector< AtomicId > &train) const |
SourceVariable * | getVariable (AtomicId source, AtomicId name) const |
void | makeProcessor (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *elem, AtomicId id, const char *name) |
Calibration::MVAComputer * | makeTrainCalibration (const AtomicId *compute, const AtomicId *train) const |
Private Attributes | |
double | crossValidation |
bool | doAutoSave |
bool | doCleanup |
bool | doMonitoring |
Source * | input |
std::auto_ptr< TrainerMonitoring > | monitoring |
std::string | name |
TrainProcessor * | output |
std::vector< AtomicId > | processors |
UInt_t | randomSeed |
std::map< AtomicId, Source * > | sources |
std::string | trainFileMask |
std::vector< SourceVariable * > | variables |
std::auto_ptr< XMLDocument > | xml |
Definition at line 27 of file MVATrainer.h.
PhysicsTools::MVATrainer::MVATrainer | ( | const std::string & | fileName, |
bool | useXSLT = false , |
||
const char * | styleSheet = 0 |
||
) |
Definition at line 422 of file MVATrainer.cc.
References ws_sso_content_reader::content, createVariable(), HTMLExport::elem(), PhysicsTools::escape(), Exception, fillInputVars(), fillOutputVars(), PhysicsTools::Variable::FLAG_NONE, PhysicsTools::Variable::FLAG_OPTIONAL, edm::FileInPath::fullPath(), PhysicsTools::Source::getInputs(), input, PhysicsTools::SourceVariableSet::kTarget, kTargetId, PhysicsTools::SourceVariableSet::kWeight, kWeightId, makeProcessor(), name, output, popcon_last_value_cfg::Source, sources, AlCaHLTBitMon_QueryRunRegistry::string, trainFileMask, and xml.
PhysicsTools::MVATrainer::~MVATrainer | ( | ) |
Definition at line 563 of file MVATrainer.cc.
References PhysicsTools::TrainProcessor::cleanup(), doCleanup, monitoring, output, proc, sources, and variables.
TrainerMonitoring::Module * PhysicsTools::MVATrainer::bookMonitor | ( | const std::string & | name | ) |
Definition at line 710 of file MVATrainer.cc.
References doMonitoring, MillePedeFileConverter_cfg::fileName, monitoring, PhysicsTools::stdStringPrintf(), AlCaHLTBitMon_QueryRunRegistry::string, and trainFileMask.
Referenced by PhysicsTools::TrainProcessor::doTrainBegin().
|
private |
Definition at line 885 of file MVATrainer.cc.
References PhysicsTools::Calibration::MVAComputer::addProcessor(), assert(), calib, PhysicsTools::Calibration::convert(), Exception, PhysicsTools::SourceVariableSet::get(), PhysicsTools::Variable::getFlags(), PhysicsTools::Source::getInputs(), PhysicsTools::Variable::getName(), PhysicsTools::Source::getOutputs(), i, input, PhysicsTools::Calibration::MVAComputer::inputSet, plotBeamSpotDB::last, PhysicsTools::Calibration::Variable::name, output, PhysicsTools::Calibration::MVAComputer::output, PhysicsTools::SourceVariableSet::size(), findQualityFiles::size, MetTreeProducer::var(), and variables.
Referenced by getCalibration(), and makeTrainCalibration().
|
private |
Definition at line 734 of file MVATrainer.cc.
References PhysicsTools::Source::getName(), getVariable(), name, MetTreeProducer::var(), and variables.
Referenced by fillOutputVars(), and MVATrainer().
void PhysicsTools::MVATrainer::doneTraining | ( | Calibration::MVAComputer * | trainCalibration | ) | const |
Definition at line 1102 of file MVATrainer.cc.
References calib, and Exception.
|
private |
Definition at line 746 of file MVATrainer.cc.
References PhysicsTools::SourceVariableSet::append(), assert(), HTMLExport::elem(), Exception, spr::find(), PhysicsTools::Source::getOutput(), getVariable(), input, PhysicsTools::SourceVariableSet::kRegular, PhysicsTools::SourceVariableSet::kTarget, kTargetId, PhysicsTools::SourceVariableSet::kWeight, kWeightId, gen::n, name, source, filterCSVwithJSON::target, tmp, MetTreeProducer::var(), and variables.
Referenced by makeProcessor(), and MVATrainer().
|
private |
Definition at line 838 of file MVATrainer.cc.
References PhysicsTools::SourceVariableSet::append(), createVariable(), HTMLExport::elem(), Exception, PhysicsTools::Variable::FLAG_MULTIPLE, PhysicsTools::Variable::FLAG_NONE, PhysicsTools::Variable::FLAG_OPTIONAL, PhysicsTools::Source::getName(), PhysicsTools::isMagic(), name, and MetTreeProducer::var().
Referenced by makeProcessor(), and MVATrainer().
|
private |
Definition at line 1115 of file MVATrainer.cc.
References fileCollector::done, PhysicsTools::SourceVariableSet::get(), PhysicsTools::Source::inputs, output, mps_fire::result, source, and sources.
Referenced by getCalibration().
|
private |
Definition at line 1195 of file MVATrainer.cc.
References assert(), doMonitoring, PhysicsTools::SourceVariableSet::get(), PhysicsTools::Source::getInputs(), input, PhysicsTools::Source::isTrained(), PhysicsTools::kOutputId, output, proc, and sources.
Referenced by getTrainCalibration().
Calibration::MVAComputer * PhysicsTools::MVATrainer::getCalibration | ( | ) | const |
Definition at line 1146 of file MVATrainer.cc.
References assert(), begin, calib, connectProcessors(), end, spr::find(), findFinalProcessors(), foreach, proc, processors, source, and sources.
Referenced by PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::produce(), and PhysicsTools::TreeTrainer::train().
|
inline |
Calibration::MVAComputer * PhysicsTools::MVATrainer::getTrainCalibration | ( | ) | const |
Definition at line 1241 of file MVATrainer.cc.
References bookConverter::compute(), findUntrainedComputers(), and makeTrainCalibration().
Referenced by PhysicsTools::TreeTrainer::iteration().
|
private |
Definition at line 725 of file MVATrainer.cc.
References sources.
Referenced by createVariable(), and fillInputVars().
void PhysicsTools::MVATrainer::loadState | ( | ) |
Definition at line 583 of file MVATrainer.cc.
References assert(), source, and sources.
|
private |
Definition at line 622 of file MVATrainer.cc.
References PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::Factory::create(), HTMLExport::elem(), Exception, fillInputVars(), fillOutputVars(), proc, sources, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.
Referenced by MVATrainer().
|
private |
Definition at line 974 of file MVATrainer.cc.
References assert(), calib, bookConverter::compute(), connectProcessors(), crossValidation, doAutoSave, fileCollector::done, spr::find(), i, interceptors, PhysicsTools::kOutputId, AlignmentProducer_cff::looper, gen::n, PhysicsTools::Calibration::ProcForeach::nProcs, output, proc, processors, randomSeed, source, and sources.
Referenced by getTrainCalibration().
void PhysicsTools::MVATrainer::saveState | ( | ) |
|
inline |
|
inline |
|
inline |
Definition at line 37 of file MVATrainer.h.
References crossValidation, and PhysicsTools::split().
Referenced by PhysicsTools::TreeTrainer::train().
|
inline |
Definition at line 35 of file MVATrainer.h.
References doMonitoring, and monitoring.
Referenced by PhysicsTools::TreeTrainer::train().
|
inline |
std::string PhysicsTools::MVATrainer::trainFileName | ( | const TrainProcessor * | proc, |
const std::string & | ext, | ||
const std::string & | arg = "" |
||
) | const |
Definition at line 700 of file MVATrainer.cc.
References PhysicsTools::Source::getName(), PhysicsTools::stdStringPrintf(), AlCaHLTBitMon_QueryRunRegistry::string, and trainFileMask.
|
private |
Definition at line 115 of file MVATrainer.h.
Referenced by makeTrainCalibration(), and setCrossValidation().
|
private |
Definition at line 110 of file MVATrainer.h.
Referenced by makeTrainCalibration(), and setAutoSave().
|
private |
Definition at line 111 of file MVATrainer.h.
Referenced by cond2xml.CondXmlProcessor::__del__(), saveState(), setCleanup(), and ~MVATrainer().
|
private |
Definition at line 112 of file MVATrainer.h.
Referenced by bookMonitor(), findUntrainedComputers(), and setMonitoring().
|
private |
Definition at line 103 of file MVATrainer.h.
Referenced by connectProcessors(), fillInputVars(), findUntrainedComputers(), and MVATrainer().
|
static |
Definition at line 59 of file MVATrainer.h.
Referenced by PhysicsTools::TreeTrainer::addTree(), TtSemiLepJetCombMVATrainer::analyze(), evaluateTtFullHadSignalSel(), evaluateTtSemiLepSignalSel(), fillInputVars(), and MVATrainer().
|
static |
Definition at line 60 of file MVATrainer.h.
Referenced by PhysicsTools::TreeTrainer::addTree(), evaluateTtFullHadSignalSel(), evaluateTtSemiLepSignalSel(), fillInputVars(), and MVATrainer().
|
private |
Definition at line 106 of file MVATrainer.h.
Referenced by bookMonitor(), setMonitoring(), and ~MVATrainer().
|
private |
Definition at line 109 of file MVATrainer.h.
Referenced by dirstructure.Directory::__create_pie_image(), dqm_interfaces.DirID::__eq__(), dirstructure.Directory::__get_full_path(), dirstructure.Comparison::__get_img_name(), cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), dirstructure.Comparison::__make_image(), dirstructure.Directory::__repr__(), dqm_interfaces.DirID::__repr__(), dirstructure.Comparison::__repr__(), config.CFG::__str__(), dirstructure.Directory::calcStats(), createVariable(), validation.Sample::digest(), python.rootplot.utilities.Hist::divide(), python.rootplot.utilities.Hist::divide_wilson(), fillInputVars(), fillOutputVars(), utils.StatisticalTest::get_status(), getName(), VIDSelectorBase.VIDSelectorBase::initialize(), MVATrainer(), dirstructure.Directory::print_report(), python.rootplot.utilities.Hist::TGraph(), python.rootplot.utilities.Hist::TH1F(), and Vispa.Views.PropertyView.Property::valueChanged().
|
private |
Definition at line 104 of file MVATrainer.h.
Referenced by connectProcessors(), findFinalProcessors(), findUntrainedComputers(), makeTrainCalibration(), MVATrainer(), and ~MVATrainer().
|
private |
Definition at line 102 of file MVATrainer.h.
Referenced by getCalibration(), and makeTrainCalibration().
|
private |
Definition at line 114 of file MVATrainer.h.
Referenced by makeTrainCalibration(), and setRandomSeed().
Definition at line 100 of file MVATrainer.h.
Referenced by findFinalProcessors(), findUntrainedComputers(), getCalibration(), getVariable(), loadState(), makeProcessor(), makeTrainCalibration(), MVATrainer(), saveState(), and ~MVATrainer().
|
private |
Definition at line 108 of file MVATrainer.h.
Referenced by bookMonitor(), MVATrainer(), and trainFileName().
|
private |
Definition at line 101 of file MVATrainer.h.
Referenced by connectProcessors(), createVariable(), fillInputVars(), and ~MVATrainer().
|
private |
Definition at line 107 of file MVATrainer.h.
Referenced by MVATrainer().