English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Modeler: TPolynomialMultiDimFit.h Source File
Uranie / Modeler  v4.10.0
/* @license-end */
TPolynomialMultiDimFit.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 
45 #ifndef TPOLYNOMIALMULTIDIMFIT_H
46 #define TPOLYNOMIALMULTIDIMFIT_H
47 
48 //ROOT
49 #include "TMultiDimFit.h"
50 
51 // Uranie
52 #include "TModeler.h"
53 #include "TDataServer.h"
54 #include "TLinearRegression.h"
55 
56 namespace URANIE
57 {
58 namespace Modeler
59 {
61 {
62  // Attributs
63 protected:
64 private:
65  TMultiDimFit *_MultiDimFit;
66 public:
67 
68  // Operations
69 private:
70 public:
71  //---------------------------------------------
75 
89  TPolynomialMultiDimFit(URANIE::DataServer::TDataServer *tds,
90  TString architecture, TMultiDimFit::EMDFPolyType type,
91  Option_t *option = "");
93 
107  TPolynomialMultiDimFit(URANIE::DataServer::TDataServer *tds,
108  const char *varexpinput, const char *varexpoutput,
109  TMultiDimFit::EMDFPolyType type, Option_t * option = "");
111  virtual ~TPolynomialMultiDimFit();
113 
114  //---------------------------------------------
118  void setMinAngle(Double_t dangle = 1);
119  void setMaxAngle(Double_t dangle = 0);
120  void setMaxFunctions(Int_t n);
121  void setMaxStudy(Int_t n);
122  void setMaxTerms(Int_t n);
123  void setMaxPowers(const Int_t *powers);
124  void setMinRelativeError(Double_t derror);
125  void setPowerLimit(Double_t limit = 1e-3);
126  void setPowers(const Int_t *powers, Int_t terms);
127 
129 
132  TMultiDimFit *getMultiDimFit()
133  {
134  return _MultiDimFit;
135  }
137 
138  //---------------------------------------------
142  void estimate(Option_t * option = "");
144 
147  void fillData(TMatrixD &Aw, TVectorD &yw);
148 
150 
151  //---------------------------------------------
155 
163 // void exportFunction(const char* lang, const char* file = "",
164 // const char* name = "", Option_t *option = "");
166 
171  void exportModelCplusplus(std::ofstream * sourcefile) const;
173 
178  void exportModelFortran(std::ofstream * sourcefile) const;
179 
181 
185  void exportModelPMML(const char* file = "",
186  const char* name = "",Option_t *option = "") const
187  {
188  TString soption = option;
189  soption.ToLower();
190  UNUSED(file,name);
191  std::cerr
192  << " --- Method TPolynomialMultiDimFit::exportModelPMML(std::ofstream * sourcefile) not yet implemented"
193  << endl;
194  throw URANIE::Exceptions::UWarningExceptions(__FILE__, __LINE__,
195  "TPolynomialMultiDimFit::exportFunction\n The PMML format is not yet implemented.");
196 
197  };
198 
200 
204  void exportModelPython(std::ofstream * sourcefile) const
205  {
206  UNUSED(sourcefile);
207  std::cerr
208  << " --- Method TPolynomialMultiDimFit::exportModelPython(std::ofstream * sourcefile) not yet implemented"
209  << endl;
210  throw URANIE::Exceptions::UWarningExceptions(__FILE__, __LINE__,
211  "TPolynomialMultiDimFit::exportFunction\n The Python format is not yet implemented.");
212  };
214 
215  //---------------------------------------------
219  virtual void printLog(Option_t *option = "");
221 
222  ClassDef(URANIE::Modeler::TPolynomialMultiDimFit, ID_MODELER)
223  //Classe de
224 };
225 
226 } // Fin du namespace Modeler
227 } // Fin du namespace URANIE
228 #endif
ROOT.
Definition: TAnisp.h:163
virtual void printLog(Option_t *option="")
Interface de la classe URANIE::Modeler::TLinearRegression.
TPolynomialMultiDimFit(URANIE::DataServer::TDataServer *tds, TString architecture, TMultiDimFit::EMDFPolyType type, Option_t *option="")
Default constructor with the TDataServer and architecture.
void setMaxAngle(Double_t dangle=0)
Definition: TModeler.h:62
void exportModelFortran(std::ofstream *sourcefile) const
Export the model in Fortran langage in a file.
TMultiDimFit * _MultiDimFit
The object TMultiDimFit.
Definition: TPolynomialMultiDimFit.h:65
virtual ~TPolynomialMultiDimFit()
Default destructor.
void fillData(TMatrixD &Aw, TVectorD &yw)
Fill the data in a TMatrix and a TVector.
Interface of the class URANIE::Optimize::TModeler.
void setMaxPowers(const Int_t *powers)
Description of the class TPolynomialMultiDimFit.
Definition: TPolynomialMultiDimFit.h:60
void setMinRelativeError(Double_t derror)
void exportModelPMML(const char *file="", const char *name="", Option_t *option="") const
Export the model in a PMML file (not yet implemented)
Definition: TPolynomialMultiDimFit.h:185
void setPowers(const Int_t *powers, Int_t terms)
void estimate(Option_t *option="")
void exportModelCplusplus(std::ofstream *sourcefile) const
Export the model in an external file with a specified langage.
void setMinAngle(Double_t dangle=1)
TMultiDimFit * getMultiDimFit()
Get the TMultiDimFit ROOT object.
Definition: TPolynomialMultiDimFit.h:132
void setPowerLimit(Double_t limit=1e-3)
void exportModelPython(std::ofstream *sourcefile) const
Export the model in Python langage in a file (not yet implemented)
Definition: TPolynomialMultiDimFit.h:204