English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Modeler: TKernel.h Source File
Uranie / Modeler  v4.10.0
/* @license-end */
TKernel.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published
6 // by the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision$
22 // $State$
24 
38 #ifndef TKERNEL_H
39 #define TKERNEL_H
40 
42 #include "TMatrixDSymfwd.h"
43 
45 #include "TModeler.h"
46 
47 namespace URANIE
48 {
49 namespace Modeler
50 {
51 class TKernel: public TModeler
52 {
53 public:
55  {
64  };
65 public:
66  //---------------------------------------------
77  TKernel(URANIE::DataServer::TDataServer *tds, TString architecture, Option_t *option = "");
78 
87  TKernel(URANIE::DataServer::TDataServer *tds, const char *varexpinput,
88  const char *varexpoutput, Option_t * option = "");
90  virtual ~TKernel();
92 
93  //---------------------------------------------
97 
101  void setKernel(EKernelType nKernel);
106  void setKernel(EKernelType nKernel, Double_t dparam1);
108 
113  void setKernel(EKernelType nKernel, Double_t dparam1, Double_t dparam2);
115 
121  void setKernel(EKernelType nKernel, Double_t dparam1, Double_t dparam2,
122  Double_t dparam3);
125  {
126  return _nKernelType;
127  }
129  Double_t getParameter1()
130  {
131  return _dParameter1;
132  }
134  Double_t getParameter2()
135  {
136  return _dParameter2;
137  }
139  void setLambda(Double_t dlambda)
140  {
141  if (dlambda > 0)
142  _dLambda = dlambda;
143  }
145  Double_t getLambda()
146  {
147  return _dLambda;
148  }
150  TMatrixDSym getMatrixK() { return _matK;}
152 
153  //---------------------------------------------
162  void estimate(Option_t * option = "");
163 
169  void fillData();
170 
176  void computeK(Option_t * option = "");
178 
179  //---------------------------------------------
183 
188  void exportModelCplusplus(std::ofstream * sourcefile) const;
190 
194  void exportModelFortran(std::ofstream * sourcefile) const;
195 
203  void exportModelPMML(const char* file = "",
204  const char* name = "",Option_t *option = "") const
205  {
206  TString soption = option;
207  soption.ToLower();
208  UNUSED(file,name);
209  std::cerr
210  << " --- Method TKernel::exportModelPMML(std::ofstream * sourcefile) not yet implemented"
211  << endl;
212  };
213 
215 
219  void exportModelPython(std::ofstream * sourcefile) const
220  {
221  UNUSED(sourcefile);
222  std::cerr
223  << " --- Method TKernel::exportModelPython(std::ofstream * sourcefile) not yet implemented"
224  << endl;
225  };
227 
228  //---------------------------------------------
232  void printLog(Option_t *option = "");
234 
235  //---------------------------------------------
240 private:
242  Double_t _dParameter1;
243  Double_t _dParameter2;
244  Double_t _dParameter3;
245  Int_t _nParameter;
246 
247  TMatrixD _matX;
248  TVectorD _vecY;
249 
250  TMatrixDSym _matK;
251  Double_t _dLambda;
252 
253 
254  ClassDef(URANIE::Modeler::TKernel, ID_MODELER)
255 };
256 } // End Of namespace Modeler
257 } // End Of namespace URANIE
258 #endif
259 
ROOT.
Definition: TAnisp.h:163
void setKernel(EKernelType nKernel)
Set the type of kernel without parameter.
TMatrixDSym _matK
The matrix of K (inputs)
Definition: TKernel.h:250
Double_t getParameter1()
Return First Parameter.
Definition: TKernel.h:129
Definition: TKernel.h:56
void estimate(Option_t *option="")
estimate
Int_t _nParameter
The number of parameter.
Definition: TKernel.h:245
Double_t getParameter2()
Return Second Parameter.
Definition: TKernel.h:134
Definition: TModeler.h:62
EKernelType _nKernelType
The type of Kernel.
Definition: TKernel.h:241
Definition: TKernel.h:57
Definition: TKernel.h:59
TMatrixD _matX
The matrix of inputs attributes.
Definition: TKernel.h:247
Interface of the class URANIE::Optimize::TModeler.
void exportModelPMML(const char *file="", const char *name="", Option_t *option="") const
Export the model in a PMML file (not yet implemented)
Definition: TKernel.h:203
void computeK(Option_t *option="")
compute the matrix K
Definition: TKernel.h:61
Double_t _dLambda
The lambda parameter (default 1.e-6)
Definition: TKernel.h:251
Double_t _dParameter1
The First Parameter (gamma) [1.0].
Definition: TKernel.h:242
Description of the class TKernel.
Definition: TKernel.h:51
void fillData()
Fill the matrix of Inputs attributes and the vector of output attribute (nY=1)
TVectorD _vecY
The vector of Y (outputs)
Definition: TKernel.h:248
void exportModelPython(std::ofstream *sourcefile) const
Export the model in Python langage in a file (not yet implemented)
Definition: TKernel.h:219
void setLambda(Double_t dlambda)
Set the Lambda parameter.
Definition: TKernel.h:139
Definition: TKernel.h:62
Double_t getLambda()
Get the Lambda.
Definition: TKernel.h:145
virtual ~TKernel()
Default destructor.
EKernelType
Definition: TKernel.h:54
void exportModelCplusplus(std::ofstream *sourcefile) const
Export the model in C++ langage in a file.
Definition: TKernel.h:60
EKernelType getKernel()
Return the type of Y distribution.
Definition: TKernel.h:124
Double_t _dParameter3
The Third Parameter (degree) [1.0].
Definition: TKernel.h:244
Definition: TKernel.h:58
void exportModelFortran(std::ofstream *sourcefile) const
Export the model in Fortran langage in a file.
TMatrixDSym getMatrixK()
Get the matrix _matK.
Definition: TKernel.h:150
TKernel(URANIE::DataServer::TDataServer *tds, TString architecture, Option_t *option="")
constructor with the TDataServer and the architecture
Double_t _dParameter2
The Second Parameter (coeff) [0.0].
Definition: TKernel.h:243
void printLog(Option_t *option="")