mirror of
https://github.com/BlackLight/neuralpp.git
synced 2024-12-29 12:45:12 +01:00
949 lines
46 KiB
HTML
949 lines
46 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>Neural++: neuralpp::NeuralNet Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.5.6 -->
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="navpath"><a class="el" href="namespaceneuralpp.html">neuralpp</a>::<a class="el" href="classneuralpp_1_1NeuralNet.html">NeuralNet</a>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>neuralpp::NeuralNet Class Reference</h1><!-- doxytag: class="neuralpp::NeuralNet" -->Main project's class.
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <<a class="el" href="neural_09_09_8hpp-source.html">neural++.hpp</a>></code>
|
|
<p>
|
|
|
|
<p>
|
|
<a href="classneuralpp_1_1NeuralNet-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f">source</a> { <a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f5ec2727c0756ddb097b53efe49b81afb">file</a>,
|
|
<a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f6d06b4fe9414a158c97aee1a3679a904">str</a>
|
|
}</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enum to choose the eventual training source for our network (XML from a file or from a string). <a href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f">More...</a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#92b145f2f6f00bf1ba645ce2235882c2">NeuralNet</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Empty constructor for the class - it just makes nothing. <a href="#92b145f2f6f00bf1ba645ce2235882c2"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#c79534c7c0dfb20d1d03be2ad7569b78">NeuralNet</a> (size_t in_size, size_t hidden_size, size_t out_size, double l, int e)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#c79534c7c0dfb20d1d03be2ad7569b78"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#88380cb002edcccf11b59f6d3f6c94c9">NeuralNet</a> (const char *file) throw (NetworkFileNotFoundException)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#88380cb002edcccf11b59f6d3f6c94c9"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#b4b261f7f7fa93c45855288fd66cfdca">NeuralNet</a> (size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double(*<a class="el" href="classneuralpp_1_1NeuralNet.html#df44689f4e6201ca1ddc67655cce3576">deriv</a>)(double), double l, int e)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#b4b261f7f7fa93c45855288fd66cfdca"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#7de7ee318eeb791d21a01e9e9e0e8c5a">getOutput</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It gets the output of the network (note: the layer output should contain an only neuron). <a href="#7de7ee318eeb791d21a01e9e9e0e8c5a"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#a6b8bf3800b43b58843c65fc431207ae">getOutputs</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It gets the output of the network in case the output layer contains more neurons. <a href="#a6b8bf3800b43b58843c65fc431207ae"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#423fd38a61d79905dcc12da84c805114">expected</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It gets the value expected. <a href="#423fd38a61d79905dcc12da84c805114"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#b6475762b7e9eab086befdc511f7c236">setExpected</a> (double <a class="el" href="classneuralpp_1_1NeuralNet.html#261f5f68fcc5be54250cfa03945266dd">ex</a>)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It sets the value you expect from your network. <a href="#b6475762b7e9eab086befdc511f7c236"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#b0bd1daadb06980dff1f50d33a7c098e">update</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It updates through back-propagation the weights of the synapsis and computes again the output value for <em>epochs</em> times, calling back updateWeights and commitChanges functions. <a href="#b0bd1daadb06980dff1f50d33a7c098e"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#c129c180647362da963758bfd1ba6890">propagate</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It propagates values through the network. <a href="#c129c180647362da963758bfd1ba6890"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#0de170e8ab561ad63d0739b4c4b74f68">setInput</a> (vector< double > &v)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It sets the input for the network. <a href="#0de170e8ab561ad63d0739b4c4b74f68"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#46f23f462318a4ffc037a4e806364c3f">link</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It links the layers of the network (input, hidden, output). <a href="#46f23f462318a4ffc037a4e806364c3f"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#5db8d6ba4785f732da6e642b4f8f11a0">save</a> (const char *fname)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Save a trained neural network to a binary file. <a href="#5db8d6ba4785f732da6e642b4f8f11a0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#e8b8741d28bec1354db555eabe418cb6">train</a> (string xml, <a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f">source</a> xrc) throw (InvalidXMLException)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Train a network using a training set loaded from an XML file. <a href="#e8b8741d28bec1354db555eabe418cb6"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#45c7645d4affe65752d37cd230afba24">initXML</a> (string &xml)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the training XML for the neural network. <a href="#45c7645d4affe65752d37cd230afba24"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static vector< double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#e07af23ceb8666518da0c035bf1e0376">split</a> (char delim, string str)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Splits a string into a vector of doubles, given a delimitator. <a href="#e07af23ceb8666518da0c035bf1e0376"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static string </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#4be31ecb0b543a192997bd83c6995ccb">XMLFromSet</a> (int id, string set)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: "2,3;5" - "5,6;11" - "2,2;4" - "4,5:9" This method called on the first string will return an XML such this: '<training id="0"><input id="0">2</input><input id="1">3</input><output id="0">5</output> &lt/training>'. <a href="#4be31ecb0b543a192997bd83c6995ccb"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#28b9966c5f197b8e86d57dd104aa32a6">closeXML</a> (string &xml)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Closes an open XML document generated by "initXML" and "XMLFromSet". <a href="#28b9966c5f197b8e86d57dd104aa32a6"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#94169c89a7cd47122ab5dbf1d5c5e108">updateWeights</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It updates the weights of the net's synapsis through back-propagation. <a href="#94169c89a7cd47122ab5dbf1d5c5e108"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#62695a82dfb1df758a44150921aec8e0">commitChanges</a> (<a class="el" href="classneuralpp_1_1Layer.html">Layer</a> *l)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It commits the changes made by <a class="el" href="classneuralpp_1_1NeuralNet.html#94169c89a7cd47122ab5dbf1d5c5e108" title="It updates the weights of the net's synapsis through back-propagation.">updateWeights()</a> to the layer l. <a href="#62695a82dfb1df758a44150921aec8e0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#8a140d28e6dd4097470c7c138801ad01">error</a> (double <a class="el" href="classneuralpp_1_1NeuralNet.html#261f5f68fcc5be54250cfa03945266dd">ex</a>)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">It get the error made on the expected result as |v-v'|/v. <a href="#8a140d28e6dd4097470c7c138801ad01"></a><br></td></tr>
|
|
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#4cb52dae7b43d03fac73afca7b9f3a51">epochs</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#4f88106c9e542c39eac43b4ca1974a2a">ref_epochs</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#6bd7be443e46b2fdbf1da2edb8e611ab">l_rate</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#261f5f68fcc5be54250cfa03945266dd">ex</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#e2b4e8405f9d25edab395d61502bdba9">input</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#bbdaa1b6c0a1a95d2b18cd25fda2a266">hidden</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#fa9b2dbcbb39d0fc70f790ac24069a74">output</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#c1469e6afd87d85b82f14bc246f82457">actv_f</a> )(double)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Private pointer to function, containing the function to be used as activation function. <a href="#c1469e6afd87d85b82f14bc246f82457"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">double(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classneuralpp_1_1NeuralNet.html#df44689f4e6201ca1ddc67655cce3576">deriv</a> )(double)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Private pointer to function, containing the function to be used as derivate of the activation function. <a href="#df44689f4e6201ca1ddc67655cce3576"></a><br></td></tr>
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
Main project's class.
|
|
<p>
|
|
Use *ONLY* this class, unless you know what you're doing <hr><h2>Member Enumeration Documentation</h2>
|
|
<a class="anchor" name="94c36c94060e785ea67a0014c4182f8f"></a><!-- doxytag: member="neuralpp::NeuralNet::source" ref="94c36c94060e785ea67a0014c4182f8f" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">enum <a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f">neuralpp::NeuralNet::source</a> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Enum to choose the eventual training source for our network (XML from a file or from a string).
|
|
<p>
|
|
<dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="94c36c94060e785ea67a0014c4182f8f5ec2727c0756ddb097b53efe49b81afb"></a><!-- doxytag: member="file" ref="94c36c94060e785ea67a0014c4182f8f5ec2727c0756ddb097b53efe49b81afb" args="" -->file</em> </td><td>
|
|
</td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="94c36c94060e785ea67a0014c4182f8f6d06b4fe9414a158c97aee1a3679a904"></a><!-- doxytag: member="str" ref="94c36c94060e785ea67a0014c4182f8f6d06b4fe9414a158c97aee1a3679a904" args="" -->str</em> </td><td>
|
|
</td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="92b145f2f6f00bf1ba645ce2235882c2"></a><!-- doxytag: member="neuralpp::NeuralNet::NeuralNet" ref="92b145f2f6f00bf1ba645ce2235882c2" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">neuralpp::NeuralNet::NeuralNet </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Empty constructor for the class - it just makes nothing.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="c79534c7c0dfb20d1d03be2ad7569b78"></a><!-- doxytag: member="neuralpp::NeuralNet::NeuralNet" ref="c79534c7c0dfb20d1d03be2ad7569b78" args="(size_t in_size, size_t hidden_size, size_t out_size, double l, int e)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">neuralpp::NeuralNet::NeuralNet </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>in_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>hidden_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>out_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"> <em>l</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>e</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Constructor.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>in_size</em> </td><td>Size of the input layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>hidden_size</em> </td><td>Size of the hidden layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>out_size</em> </td><td>Size of the output layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>l</em> </td><td>learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="88380cb002edcccf11b59f6d3f6c94c9"></a><!-- doxytag: member="neuralpp::NeuralNet::NeuralNet" ref="88380cb002edcccf11b59f6d3f6c94c9" args="(const char *file)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">neuralpp::NeuralNet::NeuralNet </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>file</em> </td>
|
|
<td> ) </td>
|
|
<td> throw (NetworkFileNotFoundException)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Constructor.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>Binary file containing a neural network previously saved by <a class="el" href="classneuralpp_1_1NeuralNet.html#5db8d6ba4785f732da6e642b4f8f11a0" title="Save a trained neural network to a binary file.">save()</a> method </td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>NetworkFileNotFoundException</em> </td><td></td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="b4b261f7f7fa93c45855288fd66cfdca"></a><!-- doxytag: member="neuralpp::NeuralNet::NeuralNet" ref="b4b261f7f7fa93c45855288fd66cfdca" args="(size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double(*deriv)(double), double l, int e)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">neuralpp::NeuralNet::NeuralNet </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>in_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>hidden_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"> <em>out_size</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">double(*)(double) </td>
|
|
<td class="paramname"> <em>actv</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">double(*)(double) </td>
|
|
<td class="paramname"> <em>deriv</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"> <em>l</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>e</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Constructor.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>in_size</em> </td><td>Size of the input layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>hidden_size</em> </td><td>Size of the hidden layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>out_size</em> </td><td>Size of the output layer </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>actv</em> </td><td>Activation function to use (default: f(x)=x) </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>deriv</em> </td><td>Derivate for the activation function to use (default: f'(x)=1) </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>l</em> </td><td>learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate) </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose) </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="94169c89a7cd47122ab5dbf1d5c5e108"></a><!-- doxytag: member="neuralpp::NeuralNet::updateWeights" ref="94169c89a7cd47122ab5dbf1d5c5e108" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::updateWeights </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td><code> [private]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It updates the weights of the net's synapsis through back-propagation.
|
|
<p>
|
|
In-class use only
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="62695a82dfb1df758a44150921aec8e0"></a><!-- doxytag: member="neuralpp::NeuralNet::commitChanges" ref="62695a82dfb1df758a44150921aec8e0" args="(Layer *l)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::commitChanges </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a> * </td>
|
|
<td class="paramname"> <em>l</em> </td>
|
|
<td> ) </td>
|
|
<td><code> [private]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It commits the changes made by <a class="el" href="classneuralpp_1_1NeuralNet.html#94169c89a7cd47122ab5dbf1d5c5e108" title="It updates the weights of the net's synapsis through back-propagation.">updateWeights()</a> to the layer l.
|
|
<p>
|
|
In-class use only <dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>l</em> </td><td><a class="el" href="classneuralpp_1_1Layer.html" title="Class for managing layers of neurons.">Layer</a> to commit the changes </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="8a140d28e6dd4097470c7c138801ad01"></a><!-- doxytag: member="neuralpp::NeuralNet::error" ref="8a140d28e6dd4097470c7c138801ad01" args="(double ex)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double neuralpp::NeuralNet::error </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"> <em>ex</em> </td>
|
|
<td> ) </td>
|
|
<td><code> [private]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It get the error made on the expected result as |v-v'|/v.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>ex</em> </td><td>Expected value </td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Mean error </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="7de7ee318eeb791d21a01e9e9e0e8c5a"></a><!-- doxytag: member="neuralpp::NeuralNet::getOutput" ref="7de7ee318eeb791d21a01e9e9e0e8c5a" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double neuralpp::NeuralNet::getOutput </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It gets the output of the network (note: the layer output should contain an only neuron).
|
|
<p>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The output value of the network </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="a6b8bf3800b43b58843c65fc431207ae"></a><!-- doxytag: member="neuralpp::NeuralNet::getOutputs" ref="a6b8bf3800b43b58843c65fc431207ae" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">vector<double> neuralpp::NeuralNet::getOutputs </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It gets the output of the network in case the output layer contains more neurons.
|
|
<p>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A vector containing the output values of the network </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="423fd38a61d79905dcc12da84c805114"></a><!-- doxytag: member="neuralpp::NeuralNet::expected" ref="423fd38a61d79905dcc12da84c805114" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double neuralpp::NeuralNet::expected </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It gets the value expected.
|
|
<p>
|
|
Of course you should specify this when you build your network by using setExpected. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The expected output value for a certain training phase </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="b6475762b7e9eab086befdc511f7c236"></a><!-- doxytag: member="neuralpp::NeuralNet::setExpected" ref="b6475762b7e9eab086befdc511f7c236" args="(double ex)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::setExpected </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"> <em>ex</em> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It sets the value you expect from your network.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>ex</em> </td><td>Expected output value </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="b0bd1daadb06980dff1f50d33a7c098e"></a><!-- doxytag: member="neuralpp::NeuralNet::update" ref="b0bd1daadb06980dff1f50d33a7c098e" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::update </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It updates through back-propagation the weights of the synapsis and computes again the output value for <em>epochs</em> times, calling back updateWeights and commitChanges functions.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="c129c180647362da963758bfd1ba6890"></a><!-- doxytag: member="neuralpp::NeuralNet::propagate" ref="c129c180647362da963758bfd1ba6890" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::propagate </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It propagates values through the network.
|
|
<p>
|
|
Use this when you want to give an already trained network some new values the get to the output
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="0de170e8ab561ad63d0739b4c4b74f68"></a><!-- doxytag: member="neuralpp::NeuralNet::setInput" ref="0de170e8ab561ad63d0739b4c4b74f68" args="(vector< double > &v)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::setInput </td>
|
|
<td>(</td>
|
|
<td class="paramtype">vector< double > & </td>
|
|
<td class="paramname"> <em>v</em> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It sets the input for the network.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>v</em> </td><td>Vector of doubles, containing the values to give to your network </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="46f23f462318a4ffc037a4e806364c3f"></a><!-- doxytag: member="neuralpp::NeuralNet::link" ref="46f23f462318a4ffc037a4e806364c3f" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::link </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
It links the layers of the network (input, hidden, output).
|
|
<p>
|
|
Don't use unless you exactly know what you're doing, it is already called by the constructor
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="5db8d6ba4785f732da6e642b4f8f11a0"></a><!-- doxytag: member="neuralpp::NeuralNet::save" ref="5db8d6ba4785f732da6e642b4f8f11a0" args="(const char *fname)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool neuralpp::NeuralNet::save </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>fname</em> </td>
|
|
<td> ) </td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Save a trained neural network to a binary file.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>fname</em> </td><td>Binary file where you're going to save your network </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="e8b8741d28bec1354db555eabe418cb6"></a><!-- doxytag: member="neuralpp::NeuralNet::train" ref="e8b8741d28bec1354db555eabe418cb6" args="(string xml, source xrc)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void neuralpp::NeuralNet::train </td>
|
|
<td>(</td>
|
|
<td class="paramtype">string </td>
|
|
<td class="paramname"> <em>xml</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="classneuralpp_1_1NeuralNet.html#94c36c94060e785ea67a0014c4182f8f">source</a> </td>
|
|
<td class="paramname"> <em>xrc</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td> throw (InvalidXMLException)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Train a network using a training set loaded from an XML file.
|
|
<p>
|
|
A sample XML file is available in examples/adder.xml <dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>xml</em> </td><td>XML file containing our training set </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>src</em> </td><td>Source type from which the XML will be loaded (from a file [default] or from a string) </td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InvalidXMLException</em> </td><td></td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="45c7645d4affe65752d37cd230afba24"></a><!-- doxytag: member="neuralpp::NeuralNet::initXML" ref="45c7645d4affe65752d37cd230afba24" args="(string &xml)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void neuralpp::NeuralNet::initXML </td>
|
|
<td>(</td>
|
|
<td class="paramtype">string & </td>
|
|
<td class="paramname"> <em>xml</em> </td>
|
|
<td> ) </td>
|
|
<td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Initialize the training XML for the neural network.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>xml</em> </td><td>String that will contain the XML </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="e07af23ceb8666518da0c035bf1e0376"></a><!-- doxytag: member="neuralpp::NeuralNet::split" ref="e07af23ceb8666518da0c035bf1e0376" args="(char delim, string str)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static vector<double> neuralpp::NeuralNet::split </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char </td>
|
|
<td class="paramname"> <em>delim</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">string </td>
|
|
<td class="paramname"> <em>str</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Splits a string into a vector of doubles, given a delimitator.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>delim</em> </td><td>Delimitator </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>String to be splitted </td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Vector of doubles containing splitted values </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="4be31ecb0b543a192997bd83c6995ccb"></a><!-- doxytag: member="neuralpp::NeuralNet::XMLFromSet" ref="4be31ecb0b543a192997bd83c6995ccb" args="(int id, string set)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static string neuralpp::NeuralNet::XMLFromSet </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>id</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">string </td>
|
|
<td class="paramname"> <em>set</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Get a training set from a string and copies it to an XML For example, these strings could be training sets for making sums: "2,3;5" - "5,6;11" - "2,2;4" - "4,5:9" This method called on the first string will return an XML such this: '<training id="0"><input id="0">2</input><input id="1">3</input><output id="0">5</output> &lt/training>'.
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>id</em> </td><td>ID for the given training set (0,1,..,n) </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>set</em> </td><td>String containing input values and expected outputs </td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl class="return" compact><dt><b>Returns:</b></dt><dd>XML string </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="28b9966c5f197b8e86d57dd104aa32a6"></a><!-- doxytag: member="neuralpp::NeuralNet::closeXML" ref="28b9966c5f197b8e86d57dd104aa32a6" args="(string &xml)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void neuralpp::NeuralNet::closeXML </td>
|
|
<td>(</td>
|
|
<td class="paramtype">string & </td>
|
|
<td class="paramname"> <em>xml</em> </td>
|
|
<td> ) </td>
|
|
<td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Closes an open XML document generated by "initXML" and "XMLFromSet".
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>xml</em> </td><td>XML string to be closed </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr><h2>Member Data Documentation</h2>
|
|
<a class="anchor" name="4cb52dae7b43d03fac73afca7b9f3a51"></a><!-- doxytag: member="neuralpp::NeuralNet::epochs" ref="4cb52dae7b43d03fac73afca7b9f3a51" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int <a class="el" href="classneuralpp_1_1NeuralNet.html#4cb52dae7b43d03fac73afca7b9f3a51">neuralpp::NeuralNet::epochs</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="4f88106c9e542c39eac43b4ca1974a2a"></a><!-- doxytag: member="neuralpp::NeuralNet::ref_epochs" ref="4f88106c9e542c39eac43b4ca1974a2a" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int <a class="el" href="classneuralpp_1_1NeuralNet.html#4f88106c9e542c39eac43b4ca1974a2a">neuralpp::NeuralNet::ref_epochs</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="6bd7be443e46b2fdbf1da2edb8e611ab"></a><!-- doxytag: member="neuralpp::NeuralNet::l_rate" ref="6bd7be443e46b2fdbf1da2edb8e611ab" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double <a class="el" href="classneuralpp_1_1NeuralNet.html#6bd7be443e46b2fdbf1da2edb8e611ab">neuralpp::NeuralNet::l_rate</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="261f5f68fcc5be54250cfa03945266dd"></a><!-- doxytag: member="neuralpp::NeuralNet::ex" ref="261f5f68fcc5be54250cfa03945266dd" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double <a class="el" href="classneuralpp_1_1NeuralNet.html#261f5f68fcc5be54250cfa03945266dd">neuralpp::NeuralNet::ex</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="e2b4e8405f9d25edab395d61502bdba9"></a><!-- doxytag: member="neuralpp::NeuralNet::input" ref="e2b4e8405f9d25edab395d61502bdba9" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a>* <a class="el" href="classneuralpp_1_1NeuralNet.html#e2b4e8405f9d25edab395d61502bdba9">neuralpp::NeuralNet::input</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="bbdaa1b6c0a1a95d2b18cd25fda2a266"></a><!-- doxytag: member="neuralpp::NeuralNet::hidden" ref="bbdaa1b6c0a1a95d2b18cd25fda2a266" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a>* <a class="el" href="classneuralpp_1_1NeuralNet.html#bbdaa1b6c0a1a95d2b18cd25fda2a266">neuralpp::NeuralNet::hidden</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="fa9b2dbcbb39d0fc70f790ac24069a74"></a><!-- doxytag: member="neuralpp::NeuralNet::output" ref="fa9b2dbcbb39d0fc70f790ac24069a74" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classneuralpp_1_1Layer.html">Layer</a>* <a class="el" href="classneuralpp_1_1NeuralNet.html#fa9b2dbcbb39d0fc70f790ac24069a74">neuralpp::NeuralNet::output</a><code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="c1469e6afd87d85b82f14bc246f82457"></a><!-- doxytag: member="neuralpp::NeuralNet::actv_f" ref="c1469e6afd87d85b82f14bc246f82457" args=")(double)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double(* <a class="el" href="classneuralpp_1_1NeuralNet.html#c1469e6afd87d85b82f14bc246f82457">neuralpp::NeuralNet::actv_f</a>)(double)<code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Private pointer to function, containing the function to be used as activation function.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="df44689f4e6201ca1ddc67655cce3576"></a><!-- doxytag: member="neuralpp::NeuralNet::deriv" ref="df44689f4e6201ca1ddc67655cce3576" args=")(double)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">double(* <a class="el" href="classneuralpp_1_1NeuralNet.html#df44689f4e6201ca1ddc67655cce3576">neuralpp::NeuralNet::deriv</a>)(double)<code> [private]</code> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Private pointer to function, containing the function to be used as derivate of the activation function.
|
|
<p>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="neural_09_09_8hpp-source.html">neural++.hpp</a></ul>
|
|
</div>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 9 11:11:18 2009 for Neural++ by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
|
|
</body>
|
|
</html>
|