Functions | |
PMMLLIB_EXPORT | PMMLlib::PMMLlib::PMMLlib (std::string file, bool log=false) |
PMMLLIB_EXPORT | PMMLlib::PMMLlib::PMMLlib (bool log=false) |
This constructor is mandatory for Swig because it can be used with no parameters. More... | |
PMMLLIB_EXPORT | PMMLlib::PMMLlib::~PMMLlib () |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::SetCurrentModel (std::string modelName, PMMLType type) |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::SetCurrentModel (std::string modelName) |
Throw an exception if there is no model or more than one model with name "modelName" in the PMML file. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::SetCurrentModel () |
Throw an exception if no model is found or if there are more than one model in the PMLL file. More... | |
PMMLLIB_EXPORT std::string | PMMLlib::PMMLlib::makeLog () const |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::printLog () const |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddDataField (std::string name, std::string displayName, std::string optype, std::string dataType, std::string closure, double leftMargin, double rightMargin, bool interval=false) |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddMiningSchema (std::string name, std::string usageType) |
Common to all models. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::SetHeader (std::string copyright, std::string description, std::string appName, std::string appVersion, std::string annotation) |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::UnlinkNode () |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::BackupNode () |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetModelsNb () |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::Write () |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::Write (std::string file) |
PMMLLIB_EXPORT PMMLType | PMMLlib::PMMLlib::GetCurrentModelType () |
type is kUNDEFINED if no model is set or if model type is not handled More... | |
PMMLLIB_EXPORT std::string | PMMLlib::PMMLlib::GetCurrentModelName () |
name is "" if no model is set More... | |
xmlNodePtr | PMMLlib::PMMLlib::GetChildByName (xmlNodePtr node, std::string nodename) |
xmlNodePtr | PMMLlib::PMMLlib::GetPtr (int ann_index, std::string name) |
xmlNodePtr | PMMLlib::PMMLlib::GetPtr (std::string ann_name, std::string name) |
void | PMMLlib::PMMLlib::CountModels () |
int | PMMLlib::PMMLlib::CountNeuralNetModels () |
int | PMMLlib::PMMLlib::CountRegressionModels () |
void | PMMLlib::PMMLlib::SetRootNode () |
std::string | PMMLlib::PMMLlib::GetModelName (xmlNodePtr node) |
std::string | PMMLlib::PMMLlib::GetTypeString () |
Common methods to all kinds of PMML files and models
void PMMLlib::PMMLlib::AddDataField | ( | std::string | fieldName, |
std::string | displayName, | ||
std::string | optype, | ||
std::string | dataType, | ||
std::string | closure, | ||
double | leftMargin, | ||
double | rightMargin, | ||
bool | interval = false |
||
) |
Add a DataField node to the DataDictionnary node
fieldName | Value of property "name" |
displayName | Value of property "displayName" |
optype | Value of property "optype" |
dataType | Value of property "dataType" |
closure | Value of property "closure" in node Interval |
leftMargin | Value of property "leftMargin" in node Interval |
rightMargin | Value of property "rightMargin" in node Interval |
interval | Flag to add a node Interval (if true) |
Definition at line 1318 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_rootNode, and PMMLlib::PMMLlib::GetChildByName().
void PMMLlib::PMMLlib::AddMiningSchema | ( | std::string | name, |
std::string | usageType | ||
) |
Common to all models.
Add the MiningSchema node.
name | Value of property "name". |
usageType | Value of property "usageType". |
Definition at line 287 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, and PMMLlib::PMMLlib::GetChildByName().
void PMMLlib::PMMLlib::BackupNode | ( | ) |
Make a backup of the current model node.
Definition at line 536 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_log, PMMLlib::PMMLlib::GetPtr(), and PMMLlib::PMMLlib::GetTypeString().
|
private |
Count the tags of all types of models (NeuralNetwork and RegressionModel).
Definition at line 342 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_log, PMMLlib::PMMLlib::_nbModels, PMMLlib::PMMLlib::CountNeuralNetModels(), and PMMLlib::PMMLlib::CountRegressionModels().
Referenced by PMMLlib::PMMLlib::PMMLlib(), and PMMLlib::PMMLlib::Write().
|
private |
Count NeuralNetwork models tags in the PMML file.
Definition at line 355 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_log, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::_xmlCharToString(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::CountModels().
|
private |
Count RegressionModel models tags in the PMML file.
Definition at line 376 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_log, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::_xmlCharToString(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::CountModels().
|
private |
Get the child of a node from the name of this node
node | Start node for the research |
nodeName | Name of the node to find |
Definition at line 311 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_xmlCharToString().
Referenced by PMMLlib::PMMLlib::AddDataField(), PMMLlib::PMMLlib::AddMiningSchema(), PMMLlib::PMMLlib::AddNeuralInput(), PMMLlib::PMMLlib::AddNeuralOutput(), PMMLlib::PMMLlib::CountNeuralNetModels(), PMMLlib::PMMLlib::CountRegressionModels(), PMMLlib::PMMLlib::fillVectorsForExport(), PMMLlib::PMMLlib::GetNameInput(), PMMLlib::PMMLlib::GetNameOutput(), PMMLlib::PMMLlib::GetNbHiddenLayers(), PMMLlib::PMMLlib::GetNbInputs(), PMMLlib::PMMLlib::GetNbNeuronsAtLayer(), PMMLlib::PMMLlib::GetNbOutputs(), PMMLlib::PMMLlib::GetNeuronBias(), PMMLlib::PMMLlib::GetNormalisationInput(), PMMLlib::PMMLlib::GetNormalisationOutput(), PMMLlib::PMMLlib::GetNormalizationType(), PMMLlib::PMMLlib::GetNumericPredictorCoefficient(), PMMLlib::PMMLlib::GetNumericPredictorName(), PMMLlib::PMMLlib::GetNumericPredictorNb(), PMMLlib::PMMLlib::GetPrecNeuronSynapse(), PMMLlib::PMMLlib::GetPredictorTermCoefficient(), PMMLlib::PMMLlib::GetPredictorTermFieldRefName(), PMMLlib::PMMLlib::GetPredictorTermFieldRefNb(), PMMLlib::PMMLlib::GetPredictorTermName(), PMMLlib::PMMLlib::GetPredictorTermNb(), PMMLlib::PMMLlib::GetPtr(), PMMLlib::PMMLlib::GetRegressionTableIntercept(), PMMLlib::PMMLlib::HasIntercept(), PMMLlib::PMMLlib::ReadNetworkStructure(), PMMLlib::PMMLlib::ReadRegressionStructure(), PMMLlib::PMMLlib::SetCurrentModel(), and PMMLlib::PMMLlib::SetNeuralNetName().
std::string PMMLlib::PMMLlib::GetCurrentModelName | ( | ) |
name is "" if no model is set
Get the current model name.
Definition at line 515 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, and PMMLlib::PMMLlib::_getProp().
PMMLType PMMLlib::PMMLlib::GetCurrentModelType | ( | ) |
type is kUNDEFINED if no model is set or if model type is not handled
Get the current model type.
Definition at line 497 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_xmlCharToString(), PMMLlib::kANN, PMMLlib::kLR, and PMMLlib::kUNDEFINED.
Referenced by PMMLlib::PMMLlib::SetCurrentModel().
|
private |
Get the name of the XML node of a given model
node | Model node |
Definition at line 407 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_getProp().
int PMMLlib::PMMLlib::GetModelsNb | ( | ) |
Get the number of models
Definition at line 397 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_nbModels.
|
private |
Get a pointer to the index-th node named name
index | Index of the node to search |
name | Name of the node |
Definition at line 420 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::BackupNode(), PMMLlib::PMMLlib::GetNeuralNetPtr(), and PMMLlib::PMMLlib::GetRegressionPtr().
|
private |
Get a pointer to the node named name whose 'modelName' attribute is ann_name
modelName | Model name of the node to search |
nodeName | Name of the node |
Definition at line 446 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::_rootNode, and PMMLlib::PMMLlib::GetChildByName().
|
private |
Get the tag of the current model.
Definition at line 474 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelType, PMMLlib::kANN, and PMMLlib::kLR.
Referenced by PMMLlib::PMMLlib::BackupNode(), PMMLlib::PMMLlib::GetNeuralNetPtr(), and PMMLlib::PMMLlib::GetRegressionPtr().
std::string PMMLlib::PMMLlib::makeLog | ( | ) | const |
Make the string used by PMMLlib::printLog.
Definition at line 214 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_log, and PMMLlib::PMMLlib::_pmmlFile.
Referenced by PMMLlib::PMMLlib::printLog().
PMMLlib::PMMLlib::PMMLlib | ( | std::string | file, |
bool | log = false |
||
) |
Constructor to read a PMML file.
file | Name of the PMML file to read |
log | Flag to print logs or not |
Definition at line 58 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_pmmlFile, PMMLlib::PMMLlib::_rootNode, and PMMLlib::PMMLlib::CountModels().
PMMLlib::PMMLlib::PMMLlib | ( | bool | log = false | ) |
This constructor is mandatory for Swig because it can be used with no parameters.
Constructor to create a PMML file.
log | Flag to print logs or not |
Definition at line 95 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::SetRootNode().
void PMMLlib::PMMLlib::printLog | ( | ) | const |
Print some information about the current PMML object.
Definition at line 227 of file PMMLlib.cxx.
References gui.logview::log, and PMMLlib::PMMLlib::makeLog().
void PMMLlib::PMMLlib::SetCurrentModel | ( | std::string | modelName, |
PMMLType | type | ||
) |
Set the current model and its type.
modelName | Name of the model to load (ie content of 'modelName' attribute) |
type | Type of PMML to read: one of kANN or kLR |
Definition at line 125 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentModelType, PMMLlib::PMMLlib::GetNeuralNetPtr(), PMMLlib::PMMLlib::GetRegressionPtr(), PMMLlib::kANN, and PMMLlib::kLR.
void PMMLlib::PMMLlib::SetCurrentModel | ( | std::string | modelName | ) |
Throw an exception if there is no model or more than one model with name "modelName" in the PMML file.
Set the current model and its type.
modelName | Name of the model to load (ie content of 'modelName' attribute) |
Definition at line 151 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentModelType, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::_rootNode, and PMMLlib::PMMLlib::GetCurrentModelType().
void PMMLlib::PMMLlib::SetCurrentModel | ( | ) |
Throw an exception if no model is found or if there are more than one model in the PMLL file.
Set the current model and its type.
Definition at line 184 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentModelType, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::_nbModels, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::GetChildByName(), PMMLlib::kANN, and PMMLlib::kLR.
void PMMLlib::PMMLlib::SetHeader | ( | std::string | copyright, |
std::string | description, | ||
std::string | appName, | ||
std::string | appVersion, | ||
std::string | annotation | ||
) |
Set the header node in the tree.
copyright | Copyright of the PMML file |
description | Description of the model |
appName | Name of the application that produced the file |
appVersion | Version of the application that produced the file |
annotation | Some annotation |
Definition at line 264 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_rootNode.
|
private |
Set the root node in the tree:
Definition at line 239 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_rootNode, and PMMLlib::PMMLlib::_stringToXmlChar().
Referenced by PMMLlib::PMMLlib::PMMLlib().
void PMMLlib::PMMLlib::UnlinkNode | ( | ) |
Unlink the current model node.
Definition at line 526 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode.
void PMMLlib::PMMLlib::Write | ( | ) |
Save the XML tree in the PMML file
Definition at line 565 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_pmmlFile, and PMMLlib::PMMLlib::CountModels().
void PMMLlib::PMMLlib::Write | ( | std::string | file | ) |
Save the XML tree in a given file
Name | of the file |
Definition at line 577 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_log, and PMMLBasicsTestLauncher::ret.
PMMLlib::PMMLlib::~PMMLlib | ( | ) |
Destructor of the class.
Definition at line 111 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, and PMMLlib::PMMLlib::_log.