34#ifndef ROOT_TMVA_MethodANNBase
35#define ROOT_TMVA_MethodANNBase
106 template <
typename WriteIterator>
146 virtual void BuildNetwork( std::vector<Int_t>* layout, std::vector<Double_t>* weights=NULL,
231 template <
typename WriteIterator>
244 for (
UInt_t iNode = 0; iNode < nNodes; iNode++)
246 (*writeIterator) = ((
TNeuron*)layer->
At(iNode))->GetActivationValue();
#define ClassDef(name, id)
1-D histogram with a float per channel (see TH1 documentation)}
Class that contains all the data information.
Base class for all TMVA methods using artificial neural networks.
std::vector< TH1 * > fEpochMonHistW
std::vector< TH1 * > fEpochMonHistB
std::vector< Int_t > * ParseLayoutString(TString layerSpec)
parse layout specification string and return a vector, each entry containing the number of neurons to...
virtual void ProcessOptions()
do nothing specific at this moment
TNeuronInput * fInputCalculator
virtual ~MethodANNBase()
destructor
std::vector< TNeuron * > fOutputNeurons
void DeleteNetworkLayer(TObjArray *&layer)
delete a network layer
const Ranking * CreateRanking()
compute ranking of input variables by summing function of weights
TNeuron * GetInputNeuron(Int_t index)
static const Bool_t fgDEBUG
void DeleteNetwork()
delete/clear network
void GetLayerActivation(size_t layer, WriteIterator writeIterator)
void WaitForKeyboard()
wait for keyboard input, for debugging
MethodANNBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &theData, const TString &theOption)
standard constructor Note: Right now it is an option to choose the neuron input function,...
TNeuron * GetOutputNeuron(Int_t index=0)
void AddPreLinks(TNeuron *neuron, TObjArray *prevLayer)
add synapses connecting a neuron to its preceding layer
void CreateWeightMonitoringHists(const TString &bulkname, std::vector< TH1 * > *hv=0) const
void PrintNeuron(TNeuron *neuron) const
print a neuron, for debugging
void PrintMessage(TString message, Bool_t force=kFALSE) const
print messages, turn off printing by setting verbose and debug flag appropriately
void AddWeightsXMLTo(void *parent) const
create XML description of ANN classifier
void InitANNBase()
initialize ANNBase object
Double_t GetNetworkOutput()
std::vector< Int_t > fRegulatorIdx
std::vector< Double_t > fRegulators
TH1F * fEstimatorHistTest
void SetNeuronInputCalculator(TNeuronInput *inputCalculator)
std::vector< TH1 * > fEpochMonHistS
void PrintLayer(TObjArray *layer) const
print a single layer, for debugging
virtual void BuildNetwork(std::vector< Int_t > *layout, std::vector< Double_t > *weights=NULL, Bool_t fromFile=kFALSE)
build network given a layout (number of neurons in each layer) and optional weights array
void InitWeights()
initialize the synapse weights randomly
virtual void DeclareOptions()
define the options (their key words) that can be set in the option string here the options valid for ...
virtual void ReadWeightsFromStream(std::istream &istr)
destroy/clear the network then read it back in from the weights file
void BuildLayers(std::vector< Int_t > *layout, Bool_t from_file=false)
build the network layers
TH1F * fEstimatorHistTrain
virtual void MakeClassSpecific(std::ostream &, const TString &) const
write specific classifier response
void ForceWeights(std::vector< Double_t > *weights)
force the synapse weights
virtual Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)
get the mva value generated by the NN
void BuildLayer(Int_t numNeurons, TObjArray *curLayer, TObjArray *prevLayer, Int_t layerIndex, Int_t numLayers, Bool_t from_file=false)
build a single layer with neurons and synapses connecting this layer to the previous layer
void ForceNetworkCalculations()
calculate input values to each neuron
void ForceNetworkInputs(const Event *ev, Int_t ignoreIndex=-1)
force the input values of the input neurons force the value for each input neuron
virtual const std::vector< Float_t > & GetMulticlassValues()
get the multiclass classification values generated by the NN
void ReadWeightsFromXML(void *wghtnode)
read MLP from xml weight file
Bool_t Debug() const
who the hell makes such strange Debug flags that even use "global pointers"..
virtual void WriteMonitoringHistosToFile() const
write histograms to file
virtual const std::vector< Float_t > & GetRegressionValues()
get the regression value generated by the NN
virtual void PrintNetwork() const
print network representation, for debugging
void SetActivation(TActivation *activation)
TActivation * fActivation
Virtual base Class for all MVA method.
virtual void ReadWeightsFromStream(std::istream &)=0
Ranking for variables in method (implementation)
Interface for TNeuron activation function classes.
Neuron class used by TMVA artificial neural network methods.
Double_t GetActivationValue() const
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const
Random number generator class based on M.
create variable transformations