Logo ROOT   6.16/01
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
18class TTree;
19class TNeuron;
20class TSynapse;
22class TProfile;
23class 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
36class TMLPAnalyzer : public TObject {
37
38private:
42
43protected:
45 Int_t GetNeurons(Int_t layer);
47 const char* GetInputNeuronTitle(Int_t in);
48 const char* GetOutputNeuronTitle(Int_t out);
49
50public:
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="");
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
int Int_t
Definition: RtypesCore.h:41
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
The Histogram stack class.
Definition: THStack.h:31
TTree * fAnalysisTree
Definition: TMLPAnalyzer.h:40
Int_t GetNeurons(Int_t layer)
Returns the number of neurons in given layer.
Int_t GetLayers()
Returns the number of layers.
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...
void DrawDInput(Int_t i)
Draws the distribution (on the test sample) of the impact on the network output of a small variation ...
const char * GetOutputNeuronTitle(Int_t out)
Returns the name of any neuron from the output layer.
TMLPAnalyzer(TMultiLayerPerceptron &net)
Definition: TMLPAnalyzer.h:51
void DrawDInputs()
Draws the distribution (on the test sample) of the impact on the network output of a small variation ...
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 ...
void CheckNetwork()
Gives some information about the network in the terminal.
void GatherInformations()
Collect information about what is usefull in the network.
THStack * DrawTruthDeviations(Option_t *option="")
Creates TProfiles of the difference of the MLP output minus the true value vs the true value,...
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 ...
const char * GetInputNeuronTitle(Int_t in)
Returns the name of any neuron from the input layer.
TMultiLayerPerceptron * fNetwork
Definition: TMLPAnalyzer.h:39
TTree * GetIOTree() const
Definition: TMLPAnalyzer.h:67
TMLPAnalyzer(TMultiLayerPerceptron *net)
Definition: TMLPAnalyzer.h:53
virtual ~TMLPAnalyzer()
Destructor.
TString GetNeuronFormula(Int_t idx)
Returns the formula used as input for neuron (idx) in the first layer.
void DrawNetwork(Int_t neuron, const char *signal, const char *bg)
Draws the distribution of the neural network (using ith neuron).
Mother of all ROOT objects.
Definition: TObject.h:37
Profile Histogram.
Definition: TProfile.h:32
Basic string class.
Definition: TString.h:131
A TTree object has a header with a name and a title.
Definition: TTree.h:71