2009-08-09 11:17:39 +02:00
\section { neuralpp::Synapsis Class Reference}
\label { classneuralpp_ 1_ 1Synapsis} \index { neuralpp::Synapsis@{ neuralpp::Synapsis} }
Class for managing synapsis.
{ \tt \# include $ < $ neural++.hpp$ > $ }
\subsection * { Public Member Functions}
\begin { CompactItemize}
\item
2009-09-04 11:27:14 +02:00
{ \bf Synapsis} ()
\begin { CompactList} \small \item \em Empty constructor (it does nothing). \item \end { CompactList} \item
2009-08-15 02:59:09 +02:00
{ \bf Synapsis} ({ \bf Neuron} $ \ast $ i, { \bf Neuron} $ \ast $ o, double($ \ast $ a)(double))
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Constructor. \item \end { CompactList} \item
2009-08-15 02:59:09 +02:00
{ \bf Synapsis} ({ \bf Neuron} $ \ast $ i, { \bf Neuron} $ \ast $ o, double w, double($ \ast $ a)(double))
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Constructor. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
{ \bf Neuron} $ \ast $ { \bf getIn} () const
2009-08-09 11:17:39 +02:00
\item
2009-08-16 20:57:15 +02:00
{ \bf Neuron} $ \ast $ { \bf getOut} () const
2009-08-09 11:17:39 +02:00
\item
2009-08-15 02:59:09 +02:00
void { \bf setWeight} (double w) throw (InvalidSynapticalWeightException)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Set the weight of the synapsis. \item \end { CompactList} \item
2009-08-15 02:59:09 +02:00
void { \bf setDelta} (double d) throw (InvalidSynapticalWeightException)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em It sets the delta (how much to change the weight after an update) of the synapsis. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
double { \bf getWeight} () const
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Return the weight of the synapsis. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
double { \bf getDelta} () const
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Return the delta of the synapsis. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
double { \bf getPrevDelta} () const
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Get the delta of the synapsis at the previous iteration. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
double { \bf momentum} (int N, int x) const
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Get the inertial momentum of a synapsis. \item \end { CompactList} \end { CompactItemize}
\subsection * { Private Attributes}
\begin { CompactItemize}
\item
double { \bf delta}
\item
double { \bf prev\_ \- delta}
\item
double { \bf weight}
\item
{ \bf Neuron} $ \ast $ { \bf in}
\item
{ \bf Neuron} $ \ast $ { \bf out}
\item
double($ \ast $ { \bf actv\_ \- f} )(double)
\end { CompactItemize}
\subsection { Detailed Description}
Class for managing synapsis.
Don't use this class directly unless you know what you're doing, use \doxyref { NeuralNet} { p.} { classneuralpp_ 1_ 1NeuralNet} instead
\subsection { Constructor \& Destructor Documentation}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !Synapsis@{ Synapsis} }
\index { Synapsis@{ Synapsis} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-09-04 11:27:14 +02:00
\subsubsection [Synapsis] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Synapsis::Synapsis ()\hspace { 0.3cm} { \tt [inline]} } \label { classneuralpp_ 1_ 1Synapsis_ c7760b19c56e9f69994970311703c5fa}
2009-08-09 11:17:39 +02:00
2009-09-04 11:27:14 +02:00
Empty constructor (it does nothing).
2009-08-09 11:17:39 +02:00
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !Synapsis@{ Synapsis} }
\index { Synapsis@{ Synapsis} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-15 02:59:09 +02:00
\subsubsection [Synapsis] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Synapsis::Synapsis ({ \bf Neuron} $ \ast $ { \em i} , \/ { \bf Neuron} $ \ast $ { \em o} , \/ double($ \ast $ )(double) { \em a} )} \label { classneuralpp_ 1_ 1Synapsis_ b767332fdce81af25486b8969e5d2fb3}
2009-08-09 11:17:39 +02:00
Constructor.
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-15 02:59:09 +02:00
\item [{\em i}] Input neuron \item [{\em o}] Output neuron \item [{\em a}] Activation function \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !Synapsis@{ Synapsis} }
\index { Synapsis@{ Synapsis} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-15 02:59:09 +02:00
\subsubsection [Synapsis] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Synapsis::Synapsis ({ \bf Neuron} $ \ast $ { \em i} , \/ { \bf Neuron} $ \ast $ { \em o} , \/ double { \em w} , \/ double($ \ast $ )(double) { \em a} )} \label { classneuralpp_ 1_ 1Synapsis_ af6b80ab3203bccd2ee4a36f06537517}
2009-08-09 11:17:39 +02:00
Constructor.
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-15 02:59:09 +02:00
\item [{\em i}] Input neuron \item [{\em o}] Output neuron \item [{\em w}] Weight for the synapsis (default: random) \item [{\em a}] Activation function \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\subsection { Member Function Documentation}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !getIn@{ getIn} }
\index { getIn@{ getIn} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [getIn] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Neuron} $ \ast $ neuralpp::Synapsis::getIn () const} \label { classneuralpp_ 1_ 1Synapsis_ 298fd3c7483ad572899fecec01ac8fdf}
2009-08-09 11:17:39 +02:00
\begin { Desc}
\item [Returns:] Reference to input neuron of the synapsis \end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !getOut@{ getOut} }
\index { getOut@{ getOut} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [getOut] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Neuron} $ \ast $ neuralpp::Synapsis::getOut () const} \label { classneuralpp_ 1_ 1Synapsis_ b46d876761a73a24db87f5a144a0e899}
2009-08-09 11:17:39 +02:00
\begin { Desc}
\item [Returns:] Reference to output neuron of the synapsis \end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !setWeight@{ setWeight} }
\index { setWeight@{ setWeight} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [setWeight] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Synapsis::setWeight (double { \em w} ) throw ({ \bf InvalidSynapticalWeightException} )} \label { classneuralpp_ 1_ 1Synapsis_ acee77d0fdf9889464ab5ed27beae0ff}
2009-08-09 11:17:39 +02:00
Set the weight of the synapsis.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em w}] Weight to be set \end { description}
\end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !setDelta@{ setDelta} }
\index { setDelta@{ setDelta} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [setDelta] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Synapsis::setDelta (double { \em d} ) throw ({ \bf InvalidSynapticalWeightException} )} \label { classneuralpp_ 1_ 1Synapsis_ 429ad5b25930faf436a9d725582802e1}
2009-08-09 11:17:39 +02:00
It sets the delta (how much to change the weight after an update) of the synapsis.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em d}] Delta to be set \end { description}
\end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !getWeight@{ getWeight} }
\index { getWeight@{ getWeight} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [getWeight] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Synapsis::getWeight () const} \label { classneuralpp_ 1_ 1Synapsis_ bcbf7228632ff4d6bbb67703323d2db0}
2009-08-09 11:17:39 +02:00
Return the weight of the synapsis.
\begin { Desc}
\item [Returns:] Weight of the synapsis \end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !getDelta@{ getDelta} }
\index { getDelta@{ getDelta} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [getDelta] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Synapsis::getDelta () const} \label { classneuralpp_ 1_ 1Synapsis_ 00c8e9c0804662f2b3247d6dddb4ca6c}
2009-08-09 11:17:39 +02:00
Return the delta of the synapsis.
\begin { Desc}
\item [Returns:] Delta of the synapsis \end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !getPrevDelta@{ getPrevDelta} }
\index { getPrevDelta@{ getPrevDelta} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [getPrevDelta] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Synapsis::getPrevDelta () const} \label { classneuralpp_ 1_ 1Synapsis_ 0148b9c8db870c928711168702ae51c5}
2009-08-09 11:17:39 +02:00
Get the delta of the synapsis at the previous iteration.
\begin { Desc}
\item [Returns:] The previous delta \end { Desc}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !momentum@{ momentum} }
\index { momentum@{ momentum} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
2009-08-16 20:57:15 +02:00
\subsubsection [momentum] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Synapsis::momentum (int { \em N} , \/ int { \em x} ) const} \label { classneuralpp_ 1_ 1Synapsis_ cff10a022d4c021688e4df944c05d8bd}
2009-08-09 11:17:39 +02:00
Get the inertial momentum of a synapsis.
This value is inversely proportional to the number of steps done in the learning phase (quite high at the beginning, decreasing to zero towards the end of the learning algorithm), and is needed to avoid strong oscillations in output values at the beginning, caused by the random values assigned to the synaptical weights \begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em N}] The number of iterations the network must have to adjust the output values \item [{\em x}] The number of iterations already taken \end { description}
\end { Desc}
\begin { Desc}
\item [Returns:] The inertial momentum of the synapsis \end { Desc}
\subsection { Member Data Documentation}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !delta@{ delta} }
\index { delta@{ delta} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [delta] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Synapsis::delta} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ 617fdc4305f8f1850eac267a7ee22660}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !prev\_ \- delta@{ prev\_ \- delta} }
\index { prev\_ \- delta@{ prev\_ \- delta} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [prev\_\-delta] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Synapsis::prev\_ \- delta} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ 65471cd6c9ef87609dfa4b0e5fafa708}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !weight@{ weight} }
\index { weight@{ weight} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [weight] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Synapsis::weight} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ 0bc523a8135ebbb5c0da932939d30ed7}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !in@{ in} }
\index { in@{ in} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [in] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Neuron} $ \ast $ { \bf neuralpp::Synapsis::in} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ 83d41c158054b08bd05051736e89a0ad}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !out@{ out} }
\index { out@{ out} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [out] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Neuron} $ \ast $ { \bf neuralpp::Synapsis::out} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ fb219e05038fa0da20db1082ab0500be}
\index { neuralpp::Synapsis@{ neuralpp::Synapsis} !actv\_ \- f@{ actv\_ \- f} }
\index { actv\_ \- f@{ actv\_ \- f} !neuralpp::Synapsis@{ neuralpp::Synapsis} }
\subsubsection [actv\_\-f] { \setlength { \rightskip } { 0pt plus 5cm} double($ \ast $ { \bf neuralpp::Synapsis::actv\_ \- f} )(double)\hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Synapsis_ 2539b9eef2ff0f3522aea8d89e394f02}
The documentation for this class was generated from the following file:\begin { CompactItemize}
\item
{ \bf neural++.hpp} \end { CompactItemize}