English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Modeler: URANIE::Modeler::TKernel Class Reference
Uranie / Modeler v4.9.0
/* @license-end */
URANIE::Modeler::TKernel Class Reference

Description of the class TKernel. More...

#include <TKernel.h>

Inheritance diagram for URANIE::Modeler::TKernel:
Collaboration diagram for URANIE::Modeler::TKernel:

Public Types

enum  EKernelType {
  kUnknown , kLinear , kPoly , kSigmoid ,
  kRBF , kLaplace , kSpline1 , kBernoulli1
}
 

Public Member Functions

Constructor and Destructor
 TKernel (URANIE::DataServer::TDataServer *tds, TString architecture, Option_t *option="")
 constructor with the TDataServer and the architecture
 
 TKernel (URANIE::DataServer::TDataServer *tds, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 Default constructor with input and output attributes.
 
virtual ~TKernel ()
 Default destructor.
 
Get and Set methods
void setKernel (EKernelType nKernel)
 Set the type of kernel without parameter.
 
void setKernel (EKernelType nKernel, Double_t dparam1)
 
void setKernel (EKernelType nKernel, Double_t dparam1, Double_t dparam2)
 Set the type of kernel with two parameters.
 
void setKernel (EKernelType nKernel, Double_t dparam1, Double_t dparam2, Double_t dparam3)
 Set the type of kernel with three parameters.
 
EKernelType getKernel ()
 Return the type of Y distribution.
 
Double_t getParameter1 ()
 Return First Parameter.
 
Double_t getParameter2 ()
 Return Second Parameter.
 
void setLambda (Double_t dlambda)
 Set the Lambda parameter.
 
Double_t getLambda ()
 Get the Lambda.
 
TMatrixDSym getMatrixK ()
 Get the matrix _matK.
 
Estimate
void estimate (Option_t *option="")
 estimate
 
void fillData ()
 Fill the matrix of Inputs attributes and the vector of output attribute (nY=1)
 
void computeK (Option_t *option="")
 compute the matrix K
 
Export the model in extrenal langage
void exportModelCplusplus (std::ofstream *sourcefile) const
 Export the model in C++ langage in a file.
 
void exportModelFortran (std::ofstream *sourcefile) const
 Export the model in Fortran langage in a file.
 
void exportModelPMML (const char *file="", const char *name="", Option_t *option="") const
 Export the model in a PMML file (not yet implemented)
 
void exportModelPython (std::ofstream *sourcefile) const
 Export the model in Python langage in a file (not yet implemented)
 
Printing Log
void printLog (Option_t *option="")
 
- Public Member Functions inherited from URANIE::Modeler::TModeler
 TModeler (URANIE::DataServer::TDataServer *tds, TString architecture, Option_t *option="")
 Constructor with a dataserver.
 
 TModeler (URANIE::DataServer::TDataServer *tds, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 Default constructor with input and output attributes.
 
virtual ~TModeler ()
 Default destructor.
 
TVectorD getParameters ()
 Return the parameter vector of the model.
 
Double_t getR2 () const
 Return the R2 quality.
 
const char * getInputName (Int_t i) const
 Return the name of input attributes.
 
const char * getOutputName (Int_t i=0)
 Return the name of output attribute.
 
Int_t getNInput ()
 Gets the number of input.
 
Bool_t getIntercept ()
 Gets the boolean attribut _bIntercept.
 
void setDrawProgressBar (Bool_t bbool=kTRUE)
 Set the "draw progress bar" flag.
 
Bool_t getDrawProgressBar ()
 Get the "draw progress bar" flag.
 
void train (Option_t *option="text")
 
virtual void exportFunction (const char *lang, const char *file="", const char *name="", Option_t *option="")
 Export the model in an external file with a specified langage.
 
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 

Private Attributes

Private and Public attributes
EKernelType _nKernelType
 The type of Kernel.
 
Double_t _dParameter1
 The First Parameter (gamma) [1.0].
 
Double_t _dParameter2
 The Second Parameter (coeff) [0.0].
 
Double_t _dParameter3
 The Third Parameter (degree) [1.0].
 
Int_t _nParameter
 The number of parameter.
 
TMatrixD _matX
 The matrix of inputs attributes.
 
TVectorD _vecY
 The vector of Y (outputs)
 
TMatrixDSym _matK
 The matrix of K (inputs)
 
Double_t _dLambda
 The lambda parameter (default 1.e-6)
 

Additional Inherited Members

- Public Attributes inherited from URANIE::Modeler::TModeler
Bool_t _blog
 Boolean for edit the log.
 
Bool_t _bdrawProgressBar
 Boolean to know if the progress bar has to be drawn.
 
Bool_t _bStoreYHat
 Boolean to specify if we add the \hat{} attribute in the TDS [default kTRUE].
 
URANIE::DataServer::TDataServer * _tds
 
Int_t _nS
 Pointer to a TDS.
 
TString _sInputAttributes
 The string of input attributes (separated by the character ":".
 
TString _sOutputAttributes
 The string of output attributes (separated by the character ":".
 
TString _sIntermediateArchitecture
 The intermediate (between the first and last character ",") information.
 
TList * _listOfInputAttributes
 The list of input Leaf.
 
TList * _listOfOutputAttributes
 The list of output Leaf.
 
Int_t _nX
 The number of input attributes.
 
Int_t _nY
 The number of output attributes.
 
TString _sFileName
 The name of the file when export the model without extension.
 
TString _sFunctionName
 The name of the function when export the model.
 
TVectorD _parameterValues
 The list of parameters.
 
Double_t _dr2
 The R2 quality.
 
Bool_t _bIntercept
 For certain models, add the intercept (Default is TRUE)
 

Detailed Description

Description of the class TKernel.

Member Enumeration Documentation

◆ EKernelType

Enumerator
kUnknown 
kLinear 
kPoly 
kSigmoid 
kRBF 
kLaplace 
kSpline1 
kBernoulli1 

Constructor & Destructor Documentation

◆ TKernel() [1/2]

URANIE::Modeler::TKernel::TKernel ( URANIE::DataServer::TDataServer *  tds,
TString  architecture,
Option_t *  option = "" 
)

constructor with the TDataServer and the architecture

Parameters
tds(URANIE::DataServer::TDataServer *) the dataserver
architecture(TString) The architecture (input and output attributes) of the model separated by the caracter ":"
option(Option_t *)[""] The option to pass

Referenced by ClassImp().

◆ TKernel() [2/2]

URANIE::Modeler::TKernel::TKernel ( URANIE::DataServer::TDataServer *  tds,
const char *  varexpinput,
const char *  varexpoutput,
Option_t *  option = "" 
)

Default constructor with input and output attributes.

Parameters
tds(URANIE::DataServer::TDataServer *) the dataserver
varexpinput(constchar*)[""] The list of input attributes to pass to the function separated by the caracter ":"
varexpoutput(const char *)[""] The list of output attributes separated by the caracter ":"
option(Option_t *)[""] The option to pass

◆ ~TKernel()

virtual URANIE::Modeler::TKernel::~TKernel ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ computeK()

void URANIE::Modeler::TKernel::computeK ( Option_t *  option = "")

compute the matrix K

Parameters
option

Referenced by ClassImp(), and ClassImp().

◆ estimate()

void URANIE::Modeler::TKernel::estimate ( Option_t *  option = "")

estimate

Parameters
option

Referenced by ClassImp().

◆ exportModelCplusplus()

void URANIE::Modeler::TKernel::exportModelCplusplus ( std::ofstream *  sourcefile) const
virtual

Export the model in C++ langage in a file.

Warning
Don't use this method. Use the main method TModeler::exportFunction.
Parameters
sourcefile(std::ofstream *) the pointer to the file to export the modeler.

Implements URANIE::Modeler::TModeler.

Referenced by ClassImp().

◆ exportModelFortran()

void URANIE::Modeler::TKernel::exportModelFortran ( std::ofstream *  sourcefile) const
virtual

Export the model in Fortran langage in a file.

Warning
Don't use this method. Use the main method TModeler::exportFunction.
Parameters
sourcefile(std::ofstream *) the pointer to the file to export the modeler.

Implements URANIE::Modeler::TModeler.

Referenced by ClassImp().

◆ exportModelPMML()

void URANIE::Modeler::TKernel::exportModelPMML ( const char *  file = "",
const char *  name = "",
Option_t *  option = "" 
) const
inlinevirtual

Export the model in a PMML file (not yet implemented)

Parameters
sourcefile(std::ofstream *) the pointer to the file to export the modeler.
Warning
Don't use this method. Use the main method TModeler::exportFunction.

Implements URANIE::Modeler::TModeler.

◆ exportModelPython()

void URANIE::Modeler::TKernel::exportModelPython ( std::ofstream *  sourcefile) const
inlinevirtual

Export the model in Python langage in a file (not yet implemented)

Warning
Don't use this method. Use the main method TModeler::exportFunction.
Parameters
sourcefile(std::ofstream *) the pointer to the file to export the modeler.

Implements URANIE::Modeler::TModeler.

◆ fillData()

void URANIE::Modeler::TKernel::fillData ( )

Fill the matrix of Inputs attributes and the vector of output attribute (nY=1)

Todo:
To deplace in the TModeler Class because it is the same for TLinearRegression.

Referenced by ClassImp().

◆ getKernel()

EKernelType URANIE::Modeler::TKernel::getKernel ( )
inline

Return the type of Y distribution.

References _nKernelType.

◆ getLambda()

Double_t URANIE::Modeler::TKernel::getLambda ( )
inline

Get the Lambda.

References _dLambda.

◆ getMatrixK()

TMatrixDSym URANIE::Modeler::TKernel::getMatrixK ( )
inline

Get the matrix _matK.

References _matK.

Referenced by ClassImp().

◆ getParameter1()

Double_t URANIE::Modeler::TKernel::getParameter1 ( )
inline

Return First Parameter.

References _dParameter1.

◆ getParameter2()

Double_t URANIE::Modeler::TKernel::getParameter2 ( )
inline

Return Second Parameter.

References _dParameter2.

◆ printLog()

void URANIE::Modeler::TKernel::printLog ( Option_t *  option = "")
virtual

Reimplemented from URANIE::Modeler::TModeler.

Referenced by ClassImp().

◆ setKernel() [1/4]

void URANIE::Modeler::TKernel::setKernel ( EKernelType  nKernel)

Set the type of kernel without parameter.

Parameters
nKernel(EKernelType) The type of kernel

Referenced by ClassImp(), URANIE::Modeler::TkPCA::setKernel(), URANIE::Modeler::TkPCA::setKernel(), URANIE::Modeler::TkPCA::setKernel(), and URANIE::Modeler::TkPCA::setKernel().

◆ setKernel() [2/4]

void URANIE::Modeler::TKernel::setKernel ( EKernelType  nKernel,
Double_t  dparam1 
)
Parameters
nKernel(EKernelType) The type of kernel
dparam(Double_t) the First and only one parameter

◆ setKernel() [3/4]

void URANIE::Modeler::TKernel::setKernel ( EKernelType  nKernel,
Double_t  dparam1,
Double_t  dparam2 
)

Set the type of kernel with two parameters.

Parameters
nKernel(EKernelType) The type of kernel
dparam1(Double_t) First parameter
dparam2(Double_t) Second parameter

◆ setKernel() [4/4]

void URANIE::Modeler::TKernel::setKernel ( EKernelType  nKernel,
Double_t  dparam1,
Double_t  dparam2,
Double_t  dparam3 
)

Set the type of kernel with three parameters.

Parameters
nKernel(EKernelType) The type of kernel
dparam1(Double_t) First parameter
dparam2(Double_t) Second parameter
dparam3(Double_t) Third parameter

◆ setLambda()

void URANIE::Modeler::TKernel::setLambda ( Double_t  dlambda)
inline

Set the Lambda parameter.

References _dLambda.

Member Data Documentation

◆ _dLambda

Double_t URANIE::Modeler::TKernel::_dLambda
private

The lambda parameter (default 1.e-6)

Referenced by ClassImp(), getLambda(), and setLambda().

◆ _dParameter1

Double_t URANIE::Modeler::TKernel::_dParameter1
private

The First Parameter (gamma) [1.0].

Referenced by ClassImp(), and getParameter1().

◆ _dParameter2

Double_t URANIE::Modeler::TKernel::_dParameter2
private

The Second Parameter (coeff) [0.0].

Referenced by ClassImp(), and getParameter2().

◆ _dParameter3

Double_t URANIE::Modeler::TKernel::_dParameter3
private

The Third Parameter (degree) [1.0].

Referenced by ClassImp().

◆ _matK

TMatrixDSym URANIE::Modeler::TKernel::_matK
private

The matrix of K (inputs)

Referenced by ClassImp(), and getMatrixK().

◆ _matX

TMatrixD URANIE::Modeler::TKernel::_matX
private

The matrix of inputs attributes.

Referenced by ClassImp().

◆ _nKernelType

EKernelType URANIE::Modeler::TKernel::_nKernelType
private

The type of Kernel.

Referenced by ClassImp(), and getKernel().

◆ _nParameter

Int_t URANIE::Modeler::TKernel::_nParameter
private

The number of parameter.

Referenced by ClassImp().

◆ _vecY

TVectorD URANIE::Modeler::TKernel::_vecY
private

The vector of Y (outputs)

Referenced by ClassImp().