#include <AltNeuralNetI.h>
Inheritance diagram for AltNeuralNetI:

Public Member Functions | |
| AltNeuralNetI () | |
| AltNeuralNetI (const char *name, const char *title) | |
| AltNeuralNetI (const AltNeuralNetI &cneti) | |
| ~AltNeuralNetI () | |
| void | setInputVar (std::string varName, double varValue) |
| double | getInputVar (std::string varName) |
| double | getTarget (void) const |
| void | normalizeInputs (std::map< std::string, double > norm_consts) |
| bool | isWithinLimits (void) |
| void | copyInputsToArray (float *inputs) |
| void | raiseSignalFlag (void) |
| void | raiseBackgroundFlag (void) |
| bool | isSignal (void) const |
| bool | isBackground (void) const |
| void | resetPattern (void) |
| void | resetPatternValues (void) |
| void | printI (const Option_t *opt) |
| int | getNumberOfInputs (void) const |
| std::vector< std::string > | getInputNames (void) |
Protected Member Functions | |
| void | initPattern (const std::string *var_names, const int n_vars) |
Protected Attributes | |
| std::string | fTitle |
| double | fTarget |
| std::map< std::string, double > | fSinglePattern |
|
|
Definition at line 30 of file AltNeuralNetI.cxx. References MSG. 00030 :
00031 TNamed()
00032 {
00033 MSG("AltNeuralNet",Msg::kDebug)
00034 << "Begin of AltNeuralNetI::AltNeuralNetI() ctor" << endl;
00035 LEA_CTOR;
00036 }
//_______________________________________________________________________________
|
|
||||||||||||
|
Definition at line 38 of file AltNeuralNetI.cxx. References fTitle, MSG, and name. 00038 :
00039 TNamed(name, title)
00040 {
00041 MSG("AltNeuralNet",Msg::kDebug)
00042 << "Begin of AltNeuralNetI::AltNeuralNetI(const char *, const char * ) ctor"
00043 << endl;
00044
00045 fTitle = std::string(title);
00046
00047 LEA_CTOR;
00048 }
//_______________________________________________________________________________
|
|
|
Definition at line 50 of file AltNeuralNetI.cxx. References MSG. 00050 :
00051 TNamed(cneti.GetName(), cneti.GetTitle())
00052 {
00053 MSG("AltNeuralNet",Msg::kDebug)
00054 << "Begin of AltNeuralNetI::AltNeuralNetI(const AltNeuralNetI & cneto) ctor"
00055 << endl;
00056
00057 LEA_CTOR;
00058 }
//_______________________________________________________________________________
|
|
|
Definition at line 60 of file AltNeuralNetI.cxx. References MSG. 00061 {
00062 MSG("AltNeuralNet",Msg::kDebug)
00063 << "Begin of AltNeuralNetI::~AltNeuralNetI() dtor" << endl;
00064
00065 LEA_DTOR;
00066 }
|
|
|
Definition at line 133 of file AltNeuralNetI.cxx. References fSinglePattern. Referenced by AltNeuralNetFunc::run(). 00134 {
00135 int pos = 0;
00136 std::map<std::string, double>::iterator input_iter;
00137
00138 for(input_iter = fSinglePattern.begin();
00139 input_iter != fSinglePattern.end(); ++input_iter)
00140 inputs[pos++] = (float) (*input_iter).second;
00141 }
|
|
|
Definition at line 184 of file AltNeuralNetI.cxx. References fSinglePattern. 00185 {
00186 std::vector<std::string> names;
00187 std::map<std::string, double>::iterator input_iter;
00188
00189 for(input_iter = fSinglePattern.begin();
00190 input_iter != fSinglePattern.end(); ++input_iter)
00191 names.push_back( (*input_iter).first );
00192 return names;
00193 }
|
|
|
Definition at line 106 of file AltNeuralNetI.cxx. References fSinglePattern. 00107 {
00108 assert( fSinglePattern.count(varName) == 1 );
00109 std::map<std::string, double>::iterator var = fSinglePattern.find(varName);
00110 return (*var).second;
00111 }
|
|
|
Definition at line 181 of file AltNeuralNetI.cxx. References fSinglePattern. Referenced by AltNeuralNetFunc::run(). 00181 {
00182 return (int) fSinglePattern.size(); }
|
|
|
Definition at line 113 of file AltNeuralNetI.cxx. 00113 { return fTarget; }
|
|
||||||||||||
|
Definition at line 195 of file AltNeuralNetI.cxx. References fSinglePattern. Referenced by AltNeuralNetStripPatternI::AltNeuralNetStripPatternI(). 00196 {
00197 for(int ivar=0; ivar<n_vars; ivar++)
00198 fSinglePattern.insert(
00199 std::map<std::string, double>::value_type(var_names[ivar],-1));
00200 }
|
|
|
Definition at line 149 of file AltNeuralNetI.cxx. References fTarget. 00149 { return fTarget == kBackground; }
|
|
|
Definition at line 147 of file AltNeuralNetI.cxx. References fTarget. 00147 { return fTarget == kSignal; }
|
|
|
Definition at line 151 of file AltNeuralNetI.cxx. References fSinglePattern. Referenced by normalizeInputs(). 00152 {
00153 bool within_limits = true;
00154
00155 for(std::map<std::string, double>::iterator input_iter =
00156 fSinglePattern.begin(); input_iter != fSinglePattern.end(); ++input_iter) {
00157
00158 within_limits = within_limits && ( (*input_iter).second >= 0. &&
00159 (*input_iter).second <= 1. );
00160 }
00161 return within_limits;
00162 }
|
|
|
Definition at line 115 of file AltNeuralNetI.cxx. References fSinglePattern, isWithinLimits(), MSG, and printI(). 00116 {
00117 // value --> norm_const * value;
00118
00119 for(std::map<std::string, double>::iterator iterNorm =
00120 norm_consts.begin(); iterNorm != norm_consts.end(); ++iterNorm) {
00121
00122 assert( fSinglePattern.count( (*iterNorm).first ) == 1 );
00123 //fSinglePattern[ (*iterNorm).first ) ] *= (*iterNorm).second;
00124 }
00125
00126 if(! isWithinLimits() ) {
00127 MSG("AltNeuralNet",Msg::kWarning)
00128 << "Input pattern values not in [0,1] range" << endl;
00129 printI("FULL");
00130 }
00131 }
|
|
|
Definition at line 68 of file AltNeuralNetI.cxx. References fSinglePattern, MSG, and option. Referenced by normalizeInputs(). 00069 {
00070 MSG("AltNeuralNet",Msg::kVerbose) << "Printing Neural Net Pattern" << endl;
00071 std::string option(opt);
00072
00073 std::map<std::string, double>::iterator input_iter;
00074
00075 if( option.find("FULL") > 0 ) {
00076
00077 for( input_iter = fSinglePattern.begin();
00078 input_iter != fSinglePattern.end(); ++input_iter) {
00079
00080 MSG("AltNeuralNet",Msg::kVerbose)
00081 << (*input_iter).first << "..............." << (*input_iter).second
00082 << endl;
00083 }
00084
00085 } else {
00086 std::string values = "--> ";
00087 std::ostringstream o;
00088
00089 for(input_iter = fSinglePattern.begin();
00090 input_iter != fSinglePattern.end(); ++input_iter) {
00091
00092 o << (*input_iter).second;
00093 values.append( o.str() );
00094 values += " / ";
00095 }
00096 MSG("AltNeuralNet",Msg::kVerbose) << values << endl;
00097 }
00098 }
|
|
|
Definition at line 145 of file AltNeuralNetI.cxx. References fTarget. 00145 { fTarget = kBackground;}
|
|
|
Definition at line 143 of file AltNeuralNetI.cxx. References fTarget. 00143 { fTarget = kSignal;}
|
|
|
Definition at line 164 of file AltNeuralNetI.cxx. References fSinglePattern. 00165 {
00166 for(std::map<std::string, double>::iterator iter =
00167 fSinglePattern.begin(); iter != fSinglePattern.end(); ++iter) {
00168
00169 fSinglePattern.erase( (*iter).first );
00170 }
00171 assert( fSinglePattern.size() == 0);
00172 }
|
|
|
Definition at line 174 of file AltNeuralNetI.cxx. References fSinglePattern. 00175 {
00176 for(std::map<std::string, double>::iterator iter =
00177 fSinglePattern.begin(); iter != fSinglePattern.end(); ++iter)
00178 (*iter).second = 0.0;
00179 }
|
|
||||||||||||
|
Definition at line 100 of file AltNeuralNetI.cxx. References fSinglePattern. 00101 {
00102 assert( fSinglePattern.count(varName) == 1 );
00103 fSinglePattern[varName] = varValue;
00104 }
|
|
|
Definition at line 67 of file AltNeuralNetI.h. Referenced by copyInputsToArray(), getInputNames(), getInputVar(), getNumberOfInputs(), initPattern(), isWithinLimits(), normalizeInputs(), printI(), resetPattern(), resetPatternValues(), and setInputVar(). |
|
|
Definition at line 66 of file AltNeuralNetI.h. Referenced by isBackground(), isSignal(), raiseBackgroundFlag(), and raiseSignalFlag(). |
|
|
Definition at line 65 of file AltNeuralNetI.h. Referenced by AltNeuralNetI(). |
1.3.9.1