\begin{CompactList}\small\item\em Enum to choose the eventual training source for our network (XML from a file or from a string). \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item
{\bf NeuralNet} ()
\begin{CompactList}\small\item\em Empty constructor for the class - it just makes nothing. \item\end{CompactList}\item
\begin{CompactList}\small\item\em It gets the output of the network (note: the layer output should contain an only neuron). \item\end{CompactList}\item
\begin{CompactList}\small\item\em Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: \char`\"{}2,3;5\char`\"{} - \char`\"{}5,6;11\char`\"{} - \char`\"{}2,2;4\char`\"{} - \char`\"{}4,5:9\char`\"{} This method called on the first string will return an XML such this: '$<$training id=\char`\"{}0\char`\"{}$>$$<$input id=\char`\"{}0\char`\"{}$>$2$<$/input$>$$<$input id=\char`\"{}1\char`\"{}$>$3$<$/input$>$$<$output id=\char`\"{}0\char`\"{}$>$5$<$/output$>$\</training$>$'. \item\end{CompactList}\item
\begin{CompactList}\small\item\em Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\"{}XMLFromSet\char`\"{}. \item\end{CompactList}\end{CompactItemize}
\begin{CompactList}\small\item\em Get the expected value (in case you have an only neuron in output layer). \item\end{CompactList}\item
void {\bf setExpected} (double ex)
\begin{CompactList}\small\item\em It sets the value you expect from your network (in case the network has an only neuron in its output layer). \item\end{CompactList}\item
\begin{CompactList}\small\item\em Set the values you expect from your network. \item\end{CompactList}\item
void {\bf update} ()
\begin{CompactList}\small\item\em It updates through back-propagation the weights of the synapsis and computes again the output value for {\em epochs\/} times, calling back updateWeights and commitChanges functions. \item\end{CompactList}\item
void {\bf link} ()
\begin{CompactList}\small\item\em It links the layers of the network (input, hidden, output). \item\end{CompactList}\end{CompactItemize}
\begin{CompactList}\small\item\em Private pointer to function, containing the function to be used as activation function. \item\end{CompactList}\end{CompactItemize}
\subsubsection[source]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf neuralpp::NeuralNet::source}}\label{classneuralpp_1_1NeuralNet_94c36c94060e785ea67a0014c4182f8f}
Enum to choose the eventual training source for our network (XML from a file or from a string).
\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet ()\hspace{0.3cm}{\tt [inline]}}\label{classneuralpp_1_1NeuralNet_92b145f2f6f00bf1ba645ce2235882c2}
Empty constructor for the class - it just makes nothing.
\item[{\em in\_\-size}]Size of the input layer \item[{\em hidden\_\-size}]Size of the hidden layer \item[{\em out\_\-size}]Size of the output layer \item[{\em l}]learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) \item[{\em e}]Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) \item[{\em th}]Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \item[{\em a}]Activation function to use (default: f(x)=x) \end{description}
It updates through back-propagation the weights of the synapsis and computes again the output value for {\em epochs\/} times, calling back updateWeights and commitChanges functions.
\subsubsection[getOutputs]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$double$>$ neuralpp::NeuralNet::getOutputs ()}\label{classneuralpp_1_1NeuralNet_e6d2215ecc8b560db2f6797db642191c}
It gets the output of the network in case the output layer contains more neurons.
\begin{Desc}
\item[Returns:]A vector containing the output values of the network \end{Desc}
\subsubsection[propagate]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::propagate ()}\label{classneuralpp_1_1NeuralNet_c129c180647362da963758bfd1ba6890}
\item[{\em \doxyref{NetworkFileWriteException}{p.}{classneuralpp_1_1NetworkFileWriteException}}]When you get an error writing the network's information to a file \end{description}
Load a trained neural network from a binary file. This function is deprecated and kept for back-compatibility. Use the XML format instead to load and neural networks and, respectly, the NeuralNetwork(const std::string) constructor or the \doxyref{save(const char$\ast$)}{p.}{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} methods. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]Name of the file to be loaded \end{description}
\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em \doxyref{NetworkFileNotFoundException}{p.}{classneuralpp_1_1NetworkFileNotFoundException}}]When you're trying to load an invalid network file \end{description}
Save a trained neural network to a binary file. This function is deprecated and kept for back-compatibility. Use the XML format instead to load and neural networks and, respectly, the NeuralNetwork(const std::string) constructor or the \doxyref{save(const char$\ast$)}{p.}{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} methods. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em fname}]Name of the file to be saved with the network information \end{description}
\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em \doxyref{NetworkFileWriteException}{p.}{classneuralpp_1_1NetworkFileWriteException}}]When you try to write the network information to an invalid file \end{description}
Train a network using a training set loaded from an XML file.
A sample XML file is available in examples/adder.xml \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em xml}]XML file containing our training set \item[{\em src}]Source type from which the XML will be loaded (from a file [default] or from a string) \end{description}
Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: \char`\"{}2,3;5\char`\"{} - \char`\"{}5,6;11\char`\"{} - \char`\"{}2,2;4\char`\"{} - \char`\"{}4,5:9\char`\"{} This method called on the first string will return an XML such this: '$<$training id=\char`\"{}0\char`\"{}$>$$<$input id=\char`\"{}0\char`\"{}$>$2$<$/input$>$$<$input id=\char`\"{}1\char`\"{}$>$3$<$/input$>$$<$output id=\char`\"{}0\char`\"{}$>$5$<$/output$>$\</training$>$'.
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]ID for the given training set (0,1,..,n) \item[{\em set}]String containing input values and expected outputs \end{description}
\subsubsection[expect]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$double$>${\bf neuralpp::NeuralNet::expect}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_a9e4ff43427f56663739c4c7450de8ee}
\subsubsection[actv\_\-f]{\setlength{\rightskip}{0pt plus 5cm}double($\ast${\bf neuralpp::NeuralNet::actv\_\-f})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_c1469e6afd87d85b82f14bc246f82457}
Private pointer to function, containing the function to be used as activation function.
\subsubsection[input]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast${\bf neuralpp::NeuralNet::input}}\label{classneuralpp_1_1NeuralNet_e2b4e8405f9d25edab395d61502bdba9}
\subsubsection[hidden]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast${\bf neuralpp::NeuralNet::hidden}}\label{classneuralpp_1_1NeuralNet_bbdaa1b6c0a1a95d2b18cd25fda2a266}
\subsubsection[output]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast${\bf neuralpp::NeuralNet::output}}\label{classneuralpp_1_1NeuralNet_fa9b2dbcbb39d0fc70f790ac24069a74}