#include <TrainProcessor.h>
|
virtual void | cleanup () |
|
virtual void | configure (XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *config) |
|
void | doTrainBegin () |
|
void | doTrainData (const std::vector< double > *values, bool target, double weight, bool train, bool test) |
|
void | doTrainEnd () |
|
virtual Calibration::VarProcessor * | getCalibration () const |
|
virtual Variable::Flags | getDefaultFlags () const |
|
const char * | getId () const |
|
virtual bool | load () |
|
virtual void | passFlags (const std::vector< Variable::Flags > &flags) |
|
virtual void | save () |
|
| TrainProcessor (const char *name, const AtomicId *id, MVATrainer *trainer) |
|
virtual | ~TrainProcessor () |
|
const SourceVariableSet & | getInputs () const |
|
AtomicId | getName () const |
|
SourceVariable * | getOutput (AtomicId name) const |
|
const SourceVariableSet & | getOutputs () const |
|
bool | isTrained () const |
|
| Source (AtomicId name, bool trained=false) |
|
virtual | ~Source () |
|
template<> |
VarProcessor * | create (const char *name, const Calibration::VarProcessor *calib, const MVAComputer *parent) |
|
template<> |
TrainProcessor * | create (const char *, const AtomicId *, MVATrainer *) |
|
template<> |
TrainProcessor * | create (const char *name, const AtomicId *id, MVATrainer *trainer) |
|
template<> |
VarProcessor * | create (const char *, const Calibration::VarProcessor *, const MVAComputer *) |
|
|
static Base_t * | create (const char *name, const CalibBase_t *calib, Parent_t *parent=0) |
|
Definition at line 28 of file TrainProcessor.h.
PhysicsTools::TrainProcessor::TrainProcessor |
( |
const char * |
name, |
|
|
const AtomicId * |
id, |
|
|
MVATrainer * |
trainer |
|
) |
| |
PhysicsTools::TrainProcessor::~TrainProcessor |
( |
| ) |
|
|
virtual |
virtual void PhysicsTools::TrainProcessor::cleanup |
( |
void |
| ) |
|
|
inlinevirtual |
void PhysicsTools::TrainProcessor::doTrainBegin |
( |
| ) |
|
Definition at line 30 of file TrainProcessor.cc.
References PhysicsTools::TrainerMonitoring::Module::book(), PhysicsTools::MVATrainer::bookMonitor(), PhysicsTools::TrainProcessor::SigBkg::entries, PhysicsTools::SourceVariableSet::get(), PhysicsTools::Source::getInputs(), PhysicsTools::Source::getName(), PhysicsTools::Variable::getName(), PhysicsTools::SourceVariable::getSource(), PhysicsTools::TrainProcessor::SigBkg::histo, infinity, PhysicsTools::Source::inputs, PhysicsTools::TrainProcessor::SigBkg::max, PhysicsTools::TrainProcessor::SigBkg::min, monHistos, monitoring, monModule, name, PhysicsTools::TrainProcessor::SigBkg::overflow, PhysicsTools::TrainProcessor::SigBkg::sameBinning, LaserTracksInput_cfi::source, trainBegin(), trainer, and PhysicsTools::TrainProcessor::SigBkg::underflow.
33 unsigned int nBins = 50;
51 for(std::vector<SourceVariable*>::const_iterator iter =
52 inputs.begin(); iter != inputs.end(); ++iter) {
54 SourceVariable *var = *iter;
56 (
const char*)var->getSource()->getName()
58 + (
const char*)var->getName();
61 pair.entries[0] = pair.entries[1] = 0;
63 (name +
"_bkg").c_str(),
64 (name +
" background").c_str(), nBins, 0, 0);
66 (name +
"_sig").c_str(),
67 (name +
" signal").c_str(), nBins, 0, 0);
68 pair.underflow[0] = pair.underflow[1] = 0.0;
69 pair.overflow[0] = pair.overflow[1] = 0.0;
71 pair.sameBinning =
true;
void PhysicsTools::TrainProcessor::doTrainData |
( |
const std::vector< double > * |
values, |
|
|
bool |
target, |
|
|
double |
weight, |
|
|
bool |
train, |
|
|
bool |
test |
|
) |
| |
void PhysicsTools::TrainProcessor::doTrainEnd |
( |
| ) |
|
Definition at line 123 of file TrainProcessor.cc.
References i, monHistos, monModule, and trainEnd().
128 for(std::vector<SigBkg>::const_iterator iter =
131 for(
unsigned int i = 0;
i < 2;
i++) {
132 Int_t oBin = iter->histo[
i]->GetNbinsX() + 1;
133 iter->histo[
i]->SetBinContent(0,
134 iter->histo[
i]->GetBinContent(0) +
136 iter->histo[
i]->SetBinContent(oBin,
137 iter->histo[
i]->GetBinContent(oBin) +
139 iter->histo[
i]->SetEntries(iter->entries[
i]);
bool PhysicsTools::TrainProcessor::exists |
( |
const std::string & |
name | ) |
|
|
inlineprotected |
virtual Variable::Flags PhysicsTools::TrainProcessor::getDefaultFlags |
( |
| ) |
const |
|
inlinevirtual |
const char* PhysicsTools::TrainProcessor::getId |
( |
| ) |
const |
|
inline |
virtual bool PhysicsTools::TrainProcessor::load |
( |
| ) |
|
|
inlinevirtual |
virtual void PhysicsTools::TrainProcessor::passFlags |
( |
const std::vector< Variable::Flags > & |
flags | ) |
|
|
inlinevirtual |
virtual void* PhysicsTools::TrainProcessor::requestObject |
( |
const std::string & |
name | ) |
const |
|
inlineprotectedvirtual |
virtual void PhysicsTools::TrainProcessor::save |
( |
| ) |
|
|
inlinevirtual |
virtual void PhysicsTools::TrainProcessor::testData |
( |
const std::vector< double > * |
values, |
|
|
bool |
target, |
|
|
double |
weight, |
|
|
bool |
trainedOn |
|
) |
| |
|
inlineprotectedvirtual |
virtual void PhysicsTools::TrainProcessor::trainBegin |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual void PhysicsTools::TrainProcessor::trainData |
( |
const std::vector< double > * |
values, |
|
|
bool |
target, |
|
|
double |
weight |
|
) |
| |
|
inlineprotectedvirtual |
virtual void PhysicsTools::TrainProcessor::trainEnd |
( |
| ) |
|
|
inlineprotectedvirtual |
std::vector<SigBkg> PhysicsTools::TrainProcessor::monHistos |
|
private |
Monitoring* PhysicsTools::TrainProcessor::monitoring |
|
protected |
Monitoring* PhysicsTools::TrainProcessor::monModule |
|
private |
std::string PhysicsTools::TrainProcessor::name |
|
protected |