Logo ROOT   6.10/09
Reference Guide
TMLPAnalyzer.h
Go to the documentation of this file.
1 // @(#)root/mlp:$Id$
2 // Author: Christophe.Delaere@cern.ch 25/04/04
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TMLPAnalyzer
13 #define ROOT_TMLPAnalyzer
14 
15 
16 #include "TObject.h"
17 
18 class TTree;
19 class TNeuron;
20 class TSynapse;
22 class TProfile;
23 class THStack;
24 
25 //____________________________________________________________________
26 //
27 // TMLPAnalyzer
28 //
29 // This utility class contains a set of tests usefull when developing
30 // a neural network.
31 // It allows you to check for unneeded variables, and to control
32 // the network structure.
33 //
34 //--------------------------------------------------------------------
35 
36 class TMLPAnalyzer : public TObject {
37 
38 private:
42 
43 protected:
44  Int_t GetLayers();
45  Int_t GetNeurons(Int_t layer);
47  const char* GetInputNeuronTitle(Int_t in);
48  const char* GetOutputNeuronTitle(Int_t out);
49 
50 public:
52  fNetwork(&net), fAnalysisTree(0), fIOTree(0) {}
54  fNetwork(net), fAnalysisTree(0), fIOTree(0) {}
55  virtual ~TMLPAnalyzer();
56  void DrawNetwork(Int_t neuron, const char* signal, const char* bg);
57  void DrawDInput(Int_t i);
58  void DrawDInputs();
59  TProfile* DrawTruthDeviation(Int_t outnode=0, Option_t *option="");
61  TProfile* DrawTruthDeviationInOut(Int_t innode, Int_t outnode=0,
62  Option_t *option="");
63  THStack* DrawTruthDeviationInsOut(Int_t outnode=0, Option_t *option="");
64 
65  void CheckNetwork();
66  void GatherInformations();
67  TTree* GetIOTree() const { return fIOTree;}
68 
69  ClassDef(TMLPAnalyzer, 0) // A simple analysis class for MLP
70 };
71 
72 #endif
const char * GetOutputNeuronTitle(Int_t out)
Returns the name of any neuron from the output layer.
The Histogram stack class.
Definition: THStack.h:31
void CheckNetwork()
Gives some information about the network in the terminal.
const char Option_t
Definition: RtypesCore.h:62
void DrawDInput(Int_t i)
Draws the distribution (on the test sample) of the impact on the network output of a small variation ...
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
void GatherInformations()
Collect information about what is usefull in the network.
void DrawDInputs()
Draws the distribution (on the test sample) of the impact on the network output of a small variation ...
Profile Histogram.
Definition: TProfile.h:32
Int_t GetLayers()
Returns the number of layers.
Int_t GetNeurons(Int_t layer)
Returns the number of neurons in given layer.
void DrawNetwork(Int_t neuron, const char *signal, const char *bg)
Draws the distribution of the neural network (using ith neuron).
TProfile * DrawTruthDeviationInOut(Int_t innode, Int_t outnode=0, Option_t *option="")
Creates a profile of the difference of the MLP output outnode minus the true value of outnode vs the ...
TTree * GetIOTree() const
Definition: TMLPAnalyzer.h:67
#define ClassDef(name, id)
Definition: Rtypes.h:297
TMultiLayerPerceptron * fNetwork
Definition: TMLPAnalyzer.h:39
const char * GetInputNeuronTitle(Int_t in)
Returns the name of any neuron from the input layer.
virtual ~TMLPAnalyzer()
Destructor.
TMLPAnalyzer(TMultiLayerPerceptron *net)
Definition: TMLPAnalyzer.h:53
TTree * fAnalysisTree
Definition: TMLPAnalyzer.h:40
TString GetNeuronFormula(Int_t idx)
Returns the formula used as input for neuron (idx) in the first layer.
Mother of all ROOT objects.
Definition: TObject.h:37
TProfile * DrawTruthDeviation(Int_t outnode=0, Option_t *option="")
Create a profile of the difference of the MLP output minus the true value for a given output node out...
A TTree object has a header with a name and a title.
Definition: TTree.h:78
TMLPAnalyzer(TMultiLayerPerceptron &net)
Definition: TMLPAnalyzer.h:51
THStack * DrawTruthDeviations(Option_t *option="")
Creates TProfiles of the difference of the MLP output minus the true value vs the true value...
TTree * fIOTree
Definition: TMLPAnalyzer.h:41
THStack * DrawTruthDeviationInsOut(Int_t outnode=0, Option_t *option="")
Creates a profile of the difference of the MLP output outnode minus the true value of outnode vs the ...