Functions | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddNeuralNetwork (std::string modelName, PMMLMiningFunction functionName) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddNeuralInput (int id, std::string inputName, std::string optype, std::string dataType, double orig1, double norm1, double orig2, double norm2) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddNeuralLayer (PMMLActivationFunction activationFunction) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddNeuron (int id, double bias, int conNb, int firstFrom, std::vector< double > weights) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::AddNeuralOutput (int outputNeuron, std::string outputName, std::string optype, std::string dataType, double orig1, double norm1, double orig2, double norm2) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNbInputs () |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNbOutputs () |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT std::string | PMMLlib::PMMLlib::GetNameInput (int input_index) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT std::string | PMMLlib::PMMLlib::GetNameOutput (int output_index) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNormalizationType () |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::GetNormalisationInput (int input_index, double *dnorm) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::GetNormalisationOutput (int output_index, double *dnorm) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNbHiddenLayers () |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNbLayers () |
PMMLLIB_EXPORT int | PMMLlib::PMMLlib::GetNbNeuronsAtLayer (int layer_index) |
PMMLLIB_EXPORT double | PMMLlib::PMMLlib::GetNeuronBias (int layer_index, int neu_index) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT double | PMMLlib::PMMLlib::GetPrecNeuronSynapse (int layer_index, int neu_index, int prec_index) |
Specific to NeuralNetwork. More... | |
PMMLLIB_EXPORT void | PMMLlib::PMMLlib::SetNeuralNetName (int ann_index, std::string ann_name) |
Not tested. More... | |
PMMLLIB_EXPORT std::string | PMMLlib::PMMLlib::ReadNetworkStructure () |
Specific to NeuralNetwork. More... | |
xmlNodePtr | PMMLlib::PMMLlib::GetNeuralNetPtr (std::string ann_name) |
xmlNodePtr | PMMLlib::PMMLlib::GetNeuralNetPtr (int ann_index) |
void | PMMLlib::PMMLlib::CheckNeuralNetwork () |
Called in all methods specific to the NeuralNetwork model. More... | |
Methods dedicated to neural networks
void PMMLlib::PMMLlib::AddNeuralInput | ( | int | id, |
std::string | inputName, | ||
std::string | optype, | ||
std::string | dataType, | ||
double | orig1, | ||
double | norm1, | ||
double | orig2, | ||
double | norm2 | ||
) |
Specific to NeuralNetwork.
Add a NeuralInput node to the current model.
id | Id of the input |
inputName | Name of the input |
optype | Value of property "optype" |
dataType | Value of property "dataType" |
orig1 | Value of the first origin |
norm1 | Value of the first norm |
orig2 | Value of the second origin |
norm2 | Value of the second norm |
Definition at line 1395 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
void PMMLlib::PMMLlib::AddNeuralLayer | ( | PMMLActivationFunction | activationFunction | ) |
Specific to NeuralNetwork.
Add a NeuralLayer node to the current model.
activationFunction | Activation function. One of kIDENTITY, kTANH, kLOGISTIC. |
Definition at line 1511 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::kIDENTITY, PMMLlib::kLOGISTIC, and PMMLlib::kTANH.
void PMMLlib::PMMLlib::AddNeuralNetwork | ( | std::string | modelName, |
PMMLMiningFunction | functionName | ||
) |
Specific to NeuralNetwork.
Add a NeuralNetwork node to the root node
modelName | Model name |
functionName | PMMLMiningFunction. One of : kREGRESSION. |
Definition at line 1360 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelName, PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_currentModelType, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::kANN, and PMMLlib::kREGRESSION.
void PMMLlib::PMMLlib::AddNeuralOutput | ( | int | outputNeuron, |
std::string | outputName, | ||
std::string | optype, | ||
std::string | dataType, | ||
double | orig1, | ||
double | norm1, | ||
double | orig2, | ||
double | norm2 | ||
) |
Specific to NeuralNetwork.
Add a NeuralOutput node to the current model.
outputNeuron | Id of the output |
outputName | Name of the output |
optype | Value of property "optype" |
dataType | Value of property "dataType" |
orig1 | Value of the first origin |
norm1 | Value of the first norm |
orig2 | Value of the second origin |
norm2 | Value of the second norm |
Definition at line 1456 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
void PMMLlib::PMMLlib::AddNeuron | ( | int | id, |
double | bias, | ||
int | conNb, | ||
int | firstFrom, | ||
std::vector< double > | weights | ||
) |
Specific to NeuralNetwork.
Add a NeuralLayer node to the current model.
id | Id of the layer |
bias | Value of property "bias" |
conNb | Number of Con nodes |
firstFrom | Value of property "from" for the first Con |
weights | Vector of weights (One per Con node) |
Definition at line 1554 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentNode, PMMLlib::PMMLlib::_getProp(), and PMMLlib::PMMLlib::CheckNeuralNetwork().
|
private |
Called in all methods specific to the NeuralNetwork model.
Check if the current model type is kANN. Throw an exception if the model type is not kANN.
Definition at line 729 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelType, and PMMLlib::kANN.
Referenced by PMMLlib::PMMLlib::AddNeuralInput(), PMMLlib::PMMLlib::AddNeuralLayer(), PMMLlib::PMMLlib::AddNeuralNetwork(), PMMLlib::PMMLlib::AddNeuralOutput(), PMMLlib::PMMLlib::AddNeuron(), PMMLlib::PMMLlib::ExportNeuralNetworkCpp(), PMMLlib::PMMLlib::ExportNeuralNetworkFortran(), PMMLlib::PMMLlib::ExportNeuralNetworkPyStr(), 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::GetPrecNeuronSynapse(), PMMLlib::PMMLlib::ReadNetworkStructure(), and PMMLlib::PMMLlib::SetNeuralNetName().
std::string PMMLlib::PMMLlib::GetNameInput | ( | int | index | ) |
Specific to NeuralNetwork.
Recovery of the name of an input in the current model.
index | Index of the input |
Definition at line 898 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkFortran().
std::string PMMLlib::PMMLlib::GetNameOutput | ( | int | index | ) |
Specific to NeuralNetwork.
Get the name of an output in the current model.
index | Index of the output |
Definition at line 937 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkFortran().
int PMMLlib::PMMLlib::GetNbHiddenLayers | ( | ) |
Specific to NeuralNetwork.
Get the number of hidden layers
Definition at line 1138 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::GetNbLayers().
int PMMLlib::PMMLlib::GetNbInputs | ( | ) |
Specific to NeuralNetwork.
Get the number of inputs, ie the number of NeuralInputs nodes.
Definition at line 848 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkCpp(), PMMLlib::PMMLlib::ExportNeuralNetworkFortran(), and PMMLlib::PMMLlib::ExportNeuralNetworkPyStr().
int PMMLlib::PMMLlib::GetNbLayers | ( | ) |
Get the total number of layers
Definition at line 1161 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::GetNbHiddenLayers().
int PMMLlib::PMMLlib::GetNbNeuronsAtLayer | ( | int | index | ) |
Get the number of neurons at a given layer
index | Index of the layer |
Definition at line 1171 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkCpp(), PMMLlib::PMMLlib::ExportNeuralNetworkFortran(), and PMMLlib::PMMLlib::ExportNeuralNetworkPyStr().
int PMMLlib::PMMLlib::GetNbOutputs | ( | ) |
Specific to NeuralNetwork.
Recover the number of outputs
Definition at line 872 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkCpp(), PMMLlib::PMMLlib::ExportNeuralNetworkFortran(), and PMMLlib::PMMLlib::ExportNeuralNetworkPyStr().
|
private |
Get the XML node of a given network model
name | Name of the neural network |
Definition at line 750 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::GetPtr(), and PMMLlib::PMMLlib::GetTypeString().
Referenced by PMMLlib::PMMLlib::SetCurrentModel().
|
private |
Get the XML node of a given network from the index
index | Index of the neural network |
Definition at line 740 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::GetPtr(), and PMMLlib::PMMLlib::GetTypeString().
double PMMLlib::PMMLlib::GetNeuronBias | ( | int | layer_index, |
int | neu_index | ||
) |
Specific to NeuralNetwork.
Get the bias of a neuron
layer_index | Index of the layer to get bias |
neu_index | Index of the neuron |
Definition at line 1205 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::fillVectorsForExport().
void PMMLlib::PMMLlib::GetNormalisationInput | ( | int | index, |
double * | dnorm | ||
) |
Specific to NeuralNetwork.
Get the input parameters on the normalization
node_ann | Neural network node | |
index | Index of the input | |
[out] | dnorm | Array that contains the mean and the standard deviation |
Definition at line 1017 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
void PMMLlib::PMMLlib::GetNormalisationOutput | ( | int | index, |
double * | dnorm | ||
) |
Specific to NeuralNetwork.
Get the parameters on the normalization of an output for the current model.
index | Output index | |
[out] | dnorm | Array that contains the mean and the standard deviation |
Definition at line 1077 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
int PMMLlib::PMMLlib::GetNormalizationType | ( | ) |
Specific to NeuralNetwork.
Get the normalization type of the current model
Definition at line 972 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
Referenced by PMMLlib::PMMLlib::ExportNeuralNetworkCpp(), PMMLlib::PMMLlib::ExportNeuralNetworkFortran(), and PMMLlib::PMMLlib::ExportNeuralNetworkPyStr().
double PMMLlib::PMMLlib::GetPrecNeuronSynapse | ( | int | layer_index, |
int | neu_index, | ||
int | prec_index | ||
) |
Specific to NeuralNetwork.
Get the synaptic weight
layer_index | Index of the layer to get synaptic weight |
neu_index | Index of the neuron |
prec_index | Index of the synapse |
Definition at line 1242 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.
Referenced by PMMLlib::PMMLlib::fillVectorsForExport().
std::string PMMLlib::PMMLlib::ReadNetworkStructure | ( | ) |
Specific to NeuralNetwork.
Read the structure of the network
Definition at line 760 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_currentModelNode, PMMLlib::PMMLlib::_getProp(), PMMLlib::PMMLlib::CheckNeuralNetwork(), and PMMLlib::PMMLlib::GetChildByName().
void PMMLlib::PMMLlib::SetNeuralNetName | ( | int | index, |
std::string | name | ||
) |
Not tested.
Set the name of the neural network
index | Neural network index |
name | Neural network name to set |
Definition at line 1287 of file PMMLlib.cxx.
References PMMLlib::PMMLlib::_doc, PMMLlib::PMMLlib::_pmmlFile, PMMLlib::PMMLlib::_rootNode, PMMLlib::PMMLlib::CheckNeuralNetwork(), PMMLlib::PMMLlib::GetChildByName(), and CORBAEngineTest::i.