30#ifndef ROOT_TMVA_MethodDNN
31#define ROOT_TMVA_MethodDNN
86 using LayoutVector_t = std::vector<std::pair<int, DNN::EActivationFunction>>;
151 UInt_t numberTargets )
override;
156 void Train()
override;
182 std::stringstream matrixStringStream(
"");
183 matrixStringStream.precision( 16 );
185 for (
size_t i = 0; i < (size_t)
X.GetNrows(); i++)
187 for (
size_t j = 0; j < (size_t)
X.GetNcols(); j++)
189 matrixStringStream << std::scientific <<
X(i,j) <<
" ";
192 std::string s = matrixStringStream.str();
195 gTools().StringFromInt((
int)
X.GetNrows()));
197 gTools().StringFromInt((
int)
X.GetNcols()));
211 std::stringstream matrixStringStream(matrixString);
213 for (
size_t i = 0; i < rows; i++)
215 for (
size_t j = 0; j < cols; j++)
217 matrixStringStream >>
X(i,j);
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
#define ClassDefOverride(name, id)
Generic neural network class.
The reference architecture class.
TMatrixT< Float_t > Matrix_t
Class that contains all the data information.
MethodBase(const TString &jobName, Types::EMVA methodType, const TString &methodTitle, DataSetInfo &dsi, const TString &theOption="")
standard constructor
void ReadWeightsFromStream(std::istream &) override=0
void AddWeightsXMLTo(void *parent) const override
void ProcessOptions() override
std::vector< std::pair< int, DNN::EActivationFunction > > LayoutVector_t
typename Architecture_t::Scalar_t Scalar_t
UInt_t GetNumValidationSamples()
typename Architecture_t::Matrix_t Matrix_t
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets) override
TString fTrainingStrategyString
KeyValueVector_t fSettings
void MakeClassSpecific(std::ostream &, const TString &) const override
LayoutVector_t ParseLayoutString(TString layerSpec)
static void WriteMatrixXML(void *parent, const char *name, const TMatrixT< Double_t > &X)
MethodDNN(DataSetInfo &theData, const TString &theWeightFile)
MethodDNN(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption)
const Ranking * CreateRanking() override
const std::vector< Float_t > & GetMulticlassValues() override
TString fWeightInitializationString
std::vector< std::map< TString, TString > > KeyValueVector_t
DNN::TReference< Float_t > Architecture_t
void DeclareOptions() override
DNN::EInitialization fWeightInitialization
friend struct TestMethodDNNValidationSize
void GetHelpMessage() const override
std::vector< TTrainingSettings > fTrainingSettings
TString fArchitectureString
const std::vector< Float_t > & GetRegressionValues() override
DNN::TNet< Architecture_t > Net_t
void ReadWeightsFromStream(std::istream &i) override
KeyValueVector_t ParseKeyValueString(TString parseString, TString blockDelim, TString tokenDelim)
DNN::EOutputFunction fOutputFunction
Double_t GetMvaValue(Double_t *err=nullptr, Double_t *errUpper=nullptr) override
static void ReadMatrixXML(void *xml, const char *name, TMatrixT< Double_t > &X)
void ReadWeightsFromXML(void *wghtnode) override
Ranking for variables in method (implementation).
Bool_t AddRawLine(XMLNodePointer_t parent, const char *line)
Add just line into xml file Line should has correct xml syntax that later it can be decoded by xml pa...
XMLNodePointer_t NewChild(XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=nullptr)
create new child element for parent node
XMLAttrPointer_t NewAttr(XMLNodePointer_t xmlnode, XMLNsPointer_t, const char *name, const char *value)
creates new attribute for xmlnode, namespaces are not supported for attributes
const char * GetNodeContent(XMLNodePointer_t xmlnode)
get contents (if any) of xmlnode
EOutputFunction
Enum that represents output functions.
ERegularization
Enum representing the regularization type applied for a given layer.
create variable transformations
DNN::ERegularization regularization
std::vector< Double_t > dropoutProbabilities