diff --git a/ChangeLog b/ChangeLog index faada6d..760ad27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +--- Release 0.4 --- + +2009-08-15 BlackLight + + * Makefile: Now you compile Neural++ with -Wall -pedantic + -pedantic-errors -ansi. And you won't get a single error. I love writing + pedantic, pure ISO C++ code... + + * all: Hey I can't believe it guys, I've fixed that horrible bug an + neural output won't diverge anymore ^^ + Also removed the 'deriv' parameter, as function pointer. It was just + useless, as once you have an activation function, you can compute its + derivate in any points. But, of course, this makes old codes no more + compatible with this new version. + --- Release 0.3 --- 2009-08-09 BlackLight @@ -6,7 +21,7 @@ * neural++.hpp: Changed header name, added BETA0 macro * synapsis.cpp: Added momentum() method to compute the inertial momentum of a synapsis - * everything: Data type changed from float to double for everything, + * all: Data type changed from float to double for everything, fixing neuralpp namespace, fixed indentation, fixed exception throwing, fixed documentation diff --git a/Makefile b/Makefile index 43c681a..4304ec9 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ INCLUDEDIR=include PREFIX=/usr LIB=neural++ CC=g++ -CFLAGS=-Wall -pedantic -pedantic-errors +CFLAGS=-Wall -pedantic -pedantic-errors -ansi all: ${CC} -I${INCLUDEDIR} ${CFLAGS} -fPIC -g -c ${SRCDIR}/neuralnet.cpp diff --git a/TODO b/TODO index 607fc35..ee046b8 100644 --- a/TODO +++ b/TODO @@ -1,2 +1,2 @@ -Restyling for templates (now compatible only with neural networks of floats). +Restyling for templates (now compatible only with neural networks operating on 'double' real numbers). diff --git a/VERSION b/VERSION index be58634..bd73f47 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3 +0.4 diff --git a/doc/html/Markup_8h-source.html b/doc/html/Markup_8h-source.html index cf7bc47..88c2695 100644 --- a/doc/html/Markup_8h-source.html +++ b/doc/html/Markup_8h-source.html @@ -660,7 +660,7 @@ 00644 00645 #endif // !defined(_MARKUP_H_INCLUDED_) -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/Markup_8h.html b/doc/html/Markup_8h.html index daa2cee..12dfc5f 100644 --- a/doc/html/Markup_8h.html +++ b/doc/html/Markup_8h.html @@ -1031,7 +1031,7 @@

-


Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/annotated.html b/doc/html/annotated.html index b74748c..6de75b8 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -44,7 +44,7 @@ neuralpp::synrecord -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classCMarkup-members.html b/doc/html/classCMarkup-members.html index ca2d264..70ba437 100644 --- a/doc/html/classCMarkup-members.html +++ b/doc/html/classCMarkup-members.html @@ -212,7 +212,7 @@ x_WriteText(const MCD_STR &strDoc, FilePos &file)CMarkup [protected, static] ~CMarkup()CMarkup [inline] -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classCMarkup.html b/doc/html/classCMarkup.html index bfac506..38258f7 100644 --- a/doc/html/classCMarkup.html +++ b/doc/html/classCMarkup.html @@ -4478,7 +4478,7 @@
The documentation for this class was generated from the following file: -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Layer-members.html b/doc/html/classneuralpp_1_1Layer-members.html index 63abdd6..e5a5529 100644 --- a/doc/html/classneuralpp_1_1Layer-members.html +++ b/doc/html/classneuralpp_1_1Layer-members.html @@ -24,19 +24,18 @@

neuralpp::Layer Member List

This is the complete list of members for neuralpp::Layer, including all inherited members.

- - - + + - +
actv_fneuralpp::Layer [private]
derivneuralpp::Layer [private]
elementsneuralpp::Layer [private]
Layer(size_t sz, double(*a)(double), double(*d)(double))neuralpp::Layer
Layer(vector< Neuron > &neurons, double(*a)(double), double(*d)(double))neuralpp::Layer
Layer(size_t sz, double(*a)(double))neuralpp::Layer
Layer(vector< Neuron > &neurons, double(*a)(double))neuralpp::Layer
link(Layer &l)neuralpp::Layer
operator[](size_t i)neuralpp::Layer
propagate()neuralpp::Layer
setActv(vector< double > &v)neuralpp::Layer
setProp(vector< double > &v)neuralpp::Layer
size()neuralpp::Layer
size() const neuralpp::Layer
update_weightsneuralpp::Layer [private]

-
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Layer.html b/doc/html/classneuralpp_1_1Layer.html index 8399d7b..36687c6 100644 --- a/doc/html/classneuralpp_1_1Layer.html +++ b/doc/html/classneuralpp_1_1Layer.html @@ -34,13 +34,13 @@ List of all members. - + - - + + - - + + @@ -55,7 +55,7 @@ - + @@ -64,14 +64,12 @@ - -

Public Member Functions

 Layer (size_t sz, double(*a)(double), double(*d)(double))
 Layer (size_t sz, double(*a)(double))
 Constructor.
 Layer (vector< Neuron > &neurons, double(*a)(double), double(*d)(double))
 Constructor.
 Layer (vector< Neuron > &neurons, double(*a)(double))
 Alternative constructor.
Neuronoperator[] (size_t i)
 Alternative constructor.
Neuronoperator[] (size_t i) throw (NetworkIndexOutOfBoundsException)
 Redefinition for operator [].
void link (Layer &l)
void propagate ()
 It propagates its activation values to the output layers.
size_t size ()
size_t size () const

Private Attributes

vector< Neuronelements
double(* actv_f )(double)
double(* deriv )(double)

Detailed Description

Class for managing layers of neurons.

Don't use this class directly unless you know what you're doing, use NeuralNet instead


Constructor & Destructor Documentation

- +
@@ -85,13 +83,7 @@ Don't use this class directly unless you know what you're doing, use - - - - - - - + @@ -109,13 +101,12 @@ Constructor.
double(*)(double)  a,
double(*)(double)  d  a 
-
sz Size of the layer
a Activation function
d Its derivate

- +

@@ -129,13 +120,7 @@ Constructor. - - - - - - - + @@ -153,7 +138,6 @@ It directly gets a vector of neurons to build the layer
Param
double(*)(double)  a,
double(*)(double)  d  a 
-
neurons Vector of neurons to be included in the layer
a Activation function
d Its derivate
@@ -170,7 +154,7 @@ It directly gets a vector of neurons to build the layer
Param size_t  i  )  - + throw (NetworkIndexOutOfBoundsException)
@@ -290,7 +274,7 @@ It propagates its activation values to the output layers.

- +

@@ -299,7 +283,7 @@ It propagates its activation values to the output layers. - +
(  )  const
@@ -354,27 +338,12 @@ It propagates its activation values to the output layers.

-

-

- -

-
- - - - -
double(* neuralpp::Layer::deriv)(double) [private]
-
-
- -

-


The documentation for this class was generated from the following file: -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1NeuralNet-members.html b/doc/html/classneuralpp_1_1NeuralNet-members.html index 0311cfa..9b22c03 100644 --- a/doc/html/classneuralpp_1_1NeuralNet-members.html +++ b/doc/html/classneuralpp_1_1NeuralNet-members.html @@ -26,38 +26,37 @@ actv_fneuralpp::NeuralNet [private] closeXML(string &xml)neuralpp::NeuralNet [static] commitChanges(Layer *l)neuralpp::NeuralNet [private] - derivneuralpp::NeuralNet [private] epochsneuralpp::NeuralNet [private] - error(double ex)neuralpp::NeuralNet [private] + error(double ex) const neuralpp::NeuralNet [private] exneuralpp::NeuralNet [private] - expected()neuralpp::NeuralNet + expected() const neuralpp::NeuralNet file enum valueneuralpp::NeuralNet - getOutput()neuralpp::NeuralNet + getOutput() const neuralpp::NeuralNet getOutputs()neuralpp::NeuralNet - hiddenneuralpp::NeuralNet [private] + hiddenneuralpp::NeuralNet initXML(string &xml)neuralpp::NeuralNet [static] - inputneuralpp::NeuralNet [private] + inputneuralpp::NeuralNet l_rateneuralpp::NeuralNet [private] link()neuralpp::NeuralNet NeuralNet()neuralpp::NeuralNet [inline] NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double l, int e)neuralpp::NeuralNet - NeuralNet(const char *file)neuralpp::NeuralNet - NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double(*deriv)(double), double l, int e)neuralpp::NeuralNet - outputneuralpp::NeuralNet [private] + NeuralNet(const string file)neuralpp::NeuralNet + NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double l, int e)neuralpp::NeuralNet + outputneuralpp::NeuralNet propagate()neuralpp::NeuralNet ref_epochsneuralpp::NeuralNet [private] - save(const char *fname)neuralpp::NeuralNet + save(const char *fname)neuralpp::NeuralNet setExpected(double ex)neuralpp::NeuralNet setInput(vector< double > &v)neuralpp::NeuralNet source enum nameneuralpp::NeuralNet split(char delim, string str)neuralpp::NeuralNet [static] str enum valueneuralpp::NeuralNet - train(string xml, source xrc)neuralpp::NeuralNet + train(string xml, source src)neuralpp::NeuralNet update()neuralpp::NeuralNet updateWeights()neuralpp::NeuralNet [private] XMLFromSet(int id, string set)neuralpp::NeuralNet [static] -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1NeuralNet.html b/doc/html/classneuralpp_1_1NeuralNet.html index 5eb0228..19474f0 100644 --- a/doc/html/classneuralpp_1_1NeuralNet.html +++ b/doc/html/classneuralpp_1_1NeuralNet.html @@ -46,21 +46,21 @@  NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e)  Constructor.
NeuralNet (const char *file) throw (NetworkFileNotFoundException) + NeuralNet (const string file) throw (NetworkFileNotFoundException) - Constructor.
NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double(*deriv)(double), double l, int e) + Constructor.
NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double(*actv)(double), double l, int e) - Constructor.
-double getOutput () + Constructor.
+double getOutput () const - It gets the output of the network (note: the layer output should contain an only neuron).
+ It gets the output of the network (note: the layer output should contain an only neuron).
vector< double > getOutputs ()  It gets the output of the network in case the output layer contains more neurons.
-double expected () +double expected () const - It gets the value expected.
+ It gets the value expected.
void setExpected (double ex)  It sets the value you expect from your network.
@@ -76,12 +76,12 @@ void link ()  It links the layers of the network (input, hidden, output).
-bool save (const char *fname) +void save (const char *fname) throw (NetworkFileWriteException) - Save a trained neural network to a binary file.
-void train (string xml, source xrc) throw (InvalidXMLException) + Save a trained neural network to a binary file.
+void train (string xml, source src) throw (InvalidXMLException) - Train a network using a training set loaded from an XML file.
+ Train a network using a training set loaded from an XML file.

Static Public Member Functions

static void initXML (string &xml) @@ -95,6 +95,13 @@ static void closeXML (string &xml)  Closes an open XML document generated by "initXML" and "XMLFromSet".
+

Public Attributes

+Layerinput + +Layerhidden + +Layeroutput +

Private Member Functions

void updateWeights () @@ -102,9 +109,9 @@ void commitChanges (Layer *l)  It commits the changes made by updateWeights() to the layer l.
-double error (double ex) +double error (double ex) const - It get the error made on the expected result as |v-v'|/v.
+ Get the error made on the expected result as |v-v'|/v.

Private Attributes

int epochs @@ -114,18 +121,9 @@ double ex -Layerinput - -Layerhidden - -Layeroutput - double(* actv_f )(double)  Private pointer to function, containing the function to be used as activation function.
-double(* deriv )(double) - - Private pointer to function, containing the function to be used as derivate of the activation function.

Detailed Description

Main project's class. @@ -236,14 +234,14 @@ Constructor.

- +

- + @@ -257,7 +255,7 @@ Constructor.

Parameters:
neuralpp::NeuralNet::NeuralNet (const char * const string  file  )  throw (NetworkFileNotFoundException)
- +
file Binary file containing a neural network previously saved by save() method
file Binary file containing a neural network previously saved by save() method
Exceptions:
@@ -268,7 +266,7 @@ Constructor.

- +

@@ -296,12 +294,6 @@ Constructor. - - - - - - @@ -332,7 +324,6 @@ Constructor. -
double(*)(double)  actv,
double(*)(double)  deriv,
hidden_size Size of the hidden layer
out_size Size of the output layer
actv Activation function to use (default: f(x)=x)
deriv Derivate for the activation function to use (default: f'(x)=1)
l learn rate (get it after doing some experiments, but generally try to keep its value quite low to be more accurate)
e Epochs (cycles) to execute (the most you execute, the most the network can be accurate for its purpose)
@@ -389,7 +380,7 @@ In-class use only
Parameters:

- +

@@ -399,14 +390,14 @@ In-class use only
Parameters:
- +
double  ex  )  [private] const [private]

-It get the error made on the expected result as |v-v'|/v. +Get the error made on the expected result as |v-v'|/v.

Parameters:
@@ -417,7 +408,7 @@ It get the error made on the expected result as |v-v'|/v.

- +

@@ -426,7 +417,7 @@ It get the error made on the expected result as |v-v'|/v. - +
(  )  const
@@ -461,7 +452,7 @@ It gets the output of the network in case the output layer contains more neurons

- +

@@ -470,7 +461,7 @@ It gets the output of the network in case the output layer contains more neurons - +
(  )  const
@@ -600,17 +591,17 @@ It links the layers of the network (input, hidden, output). Don't use unless you exactly know what you're doing, it is already called by the constructor

- +

- + - +
bool neuralpp::NeuralNet::save void neuralpp::NeuralNet::save ( const char *  fname  )  throw (NetworkFileWriteException)
@@ -624,10 +615,15 @@ Save a trained neural network to a binary file. fname Binary file where you're going to save your network +
Exceptions:
+ + +
NetworkFileWriteException When you get an error writing the network's information to a file
+

- +

@@ -641,7 +637,7 @@ Save a trained neural network to a binary file. - + @@ -858,51 +854,6 @@ Closes an open XML document generated by "initXML" and "XMLFromSet".

- -

- -

-
-
source  xrc  src 
- - - -
Layer* neuralpp::NeuralNet::input [private]
-
-
- -

- -

-

- -

-
- - - - -
Layer* neuralpp::NeuralNet::hidden [private]
-
-
- -

- -

-

- -

-
- - - - -
Layer* neuralpp::NeuralNet::output [private]
-
-
- -

-

@@ -922,19 +873,47 @@ Private pointer to function, containing the function to be used as activation fu

- +

-Private pointer to function, containing the function to be used as derivate of the activation function. + +

+

+ +

+ +
+ +

+ +

+

+ +

+ +
+

@@ -942,7 +921,7 @@ Private pointer to function, containing the function to be used as derivate of t
The documentation for this class was generated from the following file:
-
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Neuron-members.html b/doc/html/classneuralpp_1_1Neuron-members.html index a550fb3..9cf0b19 100644 --- a/doc/html/classneuralpp_1_1Neuron-members.html +++ b/doc/html/classneuralpp_1_1Neuron-members.html @@ -25,12 +25,11 @@

neuralpp::Neuron Member List

This is the complete list of members for neuralpp::Neuron, including all inherited members.

- - - + + @@ -44,7 +43,7 @@
actv_fneuralpp::Neuron [private]
actv_valneuralpp::Neuron [private]
derivneuralpp::Neuron [private]
getActv()neuralpp::Neuron
getProp()neuralpp::Neuron
inneuralpp::Neuron [private]
Neuron(double(*a)(double), double(*d)(double))neuralpp::Neuron
Neuron(vector< Synapsis > in, vector< Synapsis > out, double(*a)(double), double(*d)(double))neuralpp::Neuron
Neuron(double(*a)(double))neuralpp::Neuron
Neuron(vector< Synapsis > in, vector< Synapsis > out, double(*a)(double))neuralpp::Neuron
nIn()neuralpp::Neuron
nOut()neuralpp::Neuron
outneuralpp::Neuron [private]
synIn(size_t i)neuralpp::Neuron
synOut(size_t i)neuralpp::Neuron
-


Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Neuron.html b/doc/html/classneuralpp_1_1Neuron.html index 7ff4b80..7876daf 100644 --- a/doc/html/classneuralpp_1_1Neuron.html +++ b/doc/html/classneuralpp_1_1Neuron.html @@ -34,12 +34,12 @@ List of all members. - + - - + + - + @@ -87,14 +87,12 @@ - -

Public Member Functions

 Neuron (double(*a)(double), double(*d)(double))
 Neuron (double(*a)(double))
 Constructor.
 Neuron (vector< Synapsis > in, vector< Synapsis > out, double(*a)(double), double(*d)(double))
 Constructor.
 Neuron (vector< Synapsis > in, vector< Synapsis > out, double(*a)(double))
 Alternative constructor, that gets also the synapsis linked to the neuron.
 Alternative constructor, that gets also the synapsis linked to the neuron.
SynapsissynIn (size_t i)
 Get the i-th synapsis connected on the input of the neuron.
double(* actv_f )(double)
double(* deriv )(double)

Detailed Description

Class for managing neurons.

Don't use this class directly unless you know what you're doing, use NeuralNet instead


Constructor & Destructor Documentation

- +
@@ -102,18 +100,9 @@ Don't use this class directly unless you know what you're doing, use neuralpp::Neuron::Neuron - - - - + + - - - - - - -
( double(*)(double)  a,
a  )  double(*)(double)  d 
)
@@ -125,13 +114,12 @@ Constructor.
Parameters:
-
a Activation function
d Its derivate

- +

@@ -151,13 +139,7 @@ Constructor. - - - - - - - + @@ -176,7 +158,6 @@ Alternative constructor, that gets also the synapsis linked to the neuron. -
double(*)(double)  a,
double(*)(double)  d  a 
in Input synapses
out Output synapses
a Activation function
d Derivate of the activation function
@@ -551,27 +532,12 @@ Remove input and output synapsis from a neuron.

-

-

- -

-
- - - - -
double(* neuralpp::Neuron::deriv)(double) [private]
-
-
- -

-


The documentation for this class was generated from the following file: -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Synapsis-members.html b/doc/html/classneuralpp_1_1Synapsis-members.html index 86dbf6e..8ac38b0 100644 --- a/doc/html/classneuralpp_1_1Synapsis-members.html +++ b/doc/html/classneuralpp_1_1Synapsis-members.html @@ -25,7 +25,6 @@

neuralpp::Synapsis Member List

This is the complete list of members for neuralpp::Synapsis, including all inherited members.

- @@ -38,11 +37,11 @@ - - + +
actv_fneuralpp::Synapsis [private]
deltaneuralpp::Synapsis [private]
derivneuralpp::Synapsis [private]
getDelta()neuralpp::Synapsis
getIn()neuralpp::Synapsis
getOut()neuralpp::Synapsis
setDelta(double d)neuralpp::Synapsis
setWeight(double w)neuralpp::Synapsis
Synapsis(Neuron *i, Neuron *o, double w, double d)neuralpp::Synapsis
Synapsis(Neuron *i, Neuron *o, double(*a)(double), double(*d)(double))neuralpp::Synapsis
Synapsis(Neuron *i, Neuron *o, double w, double(*a)(double), double(*d)(double))neuralpp::Synapsis
Synapsis(Neuron *i, Neuron *o, double(*a)(double))neuralpp::Synapsis
Synapsis(Neuron *i, Neuron *o, double w, double(*a)(double))neuralpp::Synapsis
weightneuralpp::Synapsis [private]
-


Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/classneuralpp_1_1Synapsis.html b/doc/html/classneuralpp_1_1Synapsis.html index 4b60b86..699c724 100644 --- a/doc/html/classneuralpp_1_1Synapsis.html +++ b/doc/html/classneuralpp_1_1Synapsis.html @@ -37,20 +37,20 @@  Synapsis (Neuron *i, Neuron *o, double w, double d)  Constructor.
Synapsis (Neuron *i, Neuron *o, double(*a)(double), double(*d)(double)) + Synapsis (Neuron *i, Neuron *o, double(*a)(double)) - Constructor.
Synapsis (Neuron *i, Neuron *o, double w, double(*a)(double), double(*d)(double)) + Constructor.
Synapsis (Neuron *i, Neuron *o, double w, double(*a)(double)) - Constructor.
+ Constructor.
NeurongetIn () NeurongetOut () -void setWeight (double w) +void setWeight (double w) throw (InvalidSynapticalWeightException)  Set the weight of the synapsis.
-void setDelta (double d) +void setDelta (double d) throw (InvalidSynapticalWeightException)  It sets the delta (how much to change the weight after an update) of the synapsis.
double getWeight () @@ -78,8 +78,6 @@ double(* actv_f )(double) -double(* deriv )(double) -

Detailed Description

Class for managing synapsis. @@ -136,7 +134,7 @@ Constructor.

- +

@@ -156,13 +154,7 @@ Constructor. - - - - - - - + @@ -181,13 +173,12 @@ Constructor. -
double(*)(double)  a,
double(*)(double)  d  a 
i Input neuron
o Output neuron
a Activation function
d Derivate for activation function

- +

@@ -213,13 +204,7 @@ Constructor. - - - - - - - + @@ -239,7 +224,6 @@ Constructor. -
double(*)(double)  a,
double(*)(double)  d  a 
o Output neuron
w Weight for the synapsis (default: random)
a Activation function
d Derivate for activation function
@@ -296,7 +280,7 @@ Constructor. double  w  )  - + throw (InvalidSynapticalWeightException)
@@ -323,7 +307,7 @@ Set the weight of the synapsis. double  d  )  - + throw (InvalidSynapticalWeightException)
@@ -533,27 +517,12 @@ This value is inversely proportional to the number of steps done in the learning

- -

- -

-
- - - - -
double(* neuralpp::Synapsis::deriv)(double) [private]
-
-
- -

-


The documentation for this class was generated from the following file: -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/files.html b/doc/html/files.html index 850343a..c4ab411 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -28,7 +28,7 @@ neural++_exception.hpp [code] -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/functions.html b/doc/html/functions.html index 1ee32b5..9227a96 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -93,7 +93,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/functions_0x63.html b/doc/html/functions_0x63.html index 2f8ff32..1888fac 100644 --- a/doc/html/functions_0x63.html +++ b/doc/html/functions_0x63.html @@ -77,7 +77,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::NodeStack -
Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
diff --git a/doc/html/functions_0x64.html b/doc/html/functions_0x64.html index c780dea..c45f500 100644 --- a/doc/html/functions_0x64.html +++ b/doc/html/functions_0x64.html @@ -66,16 +66,11 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup
  • delta : neuralpp::Synapsis -
  • deriv -: neuralpp::Neuron -, neuralpp::NeuralNet -, neuralpp::Layer -, neuralpp::Synapsis
  • DetectUTF8() : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x65.html b/doc/html/functions_0x65.html index cb6a46c..7d6dd04 100644 --- a/doc/html/functions_0x65.html +++ b/doc/html/functions_0x65.html @@ -72,17 +72,17 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::netrecord , neuralpp::NeuralNet
  • error() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • EscapeText() : CMarkup
  • ex : neuralpp::netrecord , neuralpp::NeuralNet
  • expected() -: neuralpp::NeuralNet +: neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x66.html b/doc/html/functions_0x66.html index 29420e0..2695797 100644 --- a/doc/html/functions_0x66.html +++ b/doc/html/functions_0x66.html @@ -72,7 +72,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::FilePos -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x67.html b/doc/html/functions_0x67.html index c274340..3d6fb23 100644 --- a/doc/html/functions_0x67.html +++ b/doc/html/functions_0x67.html @@ -93,7 +93,7 @@ Here is a list of all class members with links to the classes they belong to:
  • getOut() : neuralpp::Synapsis
  • getOutput() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • getOutputs() : neuralpp::NeuralNet
  • getPrevDelta() @@ -110,7 +110,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::Synapsis -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x68.html b/doc/html/functions_0x68.html index e1803fd..befbb28 100644 --- a/doc/html/functions_0x68.html +++ b/doc/html/functions_0x68.html @@ -64,7 +64,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::netrecord -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x69.html b/doc/html/functions_0x69.html index a7f2148..17e83c2 100644 --- a/doc/html/functions_0x69.html +++ b/doc/html/functions_0x69.html @@ -97,7 +97,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6c.html b/doc/html/functions_0x6c.html index a7d3e96..7503cb1 100644 --- a/doc/html/functions_0x6c.html +++ b/doc/html/functions_0x6c.html @@ -62,7 +62,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::NeuralNet , neuralpp::netrecord
  • Layer() -: neuralpp::Layer +: neuralpp::Layer
  • Length() : CMarkup::TokenPos
  • Level() @@ -74,7 +74,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6d.html b/doc/html/functions_0x6d.html index de280d8..c8d4e38 100644 --- a/doc/html/functions_0x6d.html +++ b/doc/html/functions_0x6d.html @@ -170,7 +170,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::Synapsis -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6e.html b/doc/html/functions_0x6e.html index 8b09c72..08f395e 100644 --- a/doc/html/functions_0x6e.html +++ b/doc/html/functions_0x6e.html @@ -65,7 +65,7 @@ Here is a list of all class members with links to the classes they belong to:
  • NeuralNet() : neuralpp::NeuralNet
  • Neuron() -: neuralpp::Neuron +: neuralpp::Neuron
  • nFailedChars : CMarkup::ConvertEncoding
  • nFileByteLen @@ -127,7 +127,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::NodeStack -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x6f.html b/doc/html/functions_0x6f.html index 1a9e810..905845c 100644 --- a/doc/html/functions_0x6f.html +++ b/doc/html/functions_0x6f.html @@ -76,7 +76,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::netrecord -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x70.html b/doc/html/functions_0x70.html index 1854c03..d173003 100644 --- a/doc/html/functions_0x70.html +++ b/doc/html/functions_0x70.html @@ -94,7 +94,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::Neuron -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x72.html b/doc/html/functions_0x72.html index 42eed7d..bd2f8c0 100644 --- a/doc/html/functions_0x72.html +++ b/doc/html/functions_0x72.html @@ -85,7 +85,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x73.html b/doc/html/functions_0x73.html index fd82ea5..d37dc35 100644 --- a/doc/html/functions_0x73.html +++ b/doc/html/functions_0x73.html @@ -61,7 +61,7 @@ Here is a list of all class members with links to the classes they belong to:
  • Save() : CMarkup
  • save() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • SavedPos() : CMarkup::SavedPos
  • SavedPosMap() @@ -109,7 +109,7 @@ Here is a list of all class members with links to the classes they belong to:
  • setWeight() : neuralpp::Synapsis
  • size() -: neuralpp::Layer +: neuralpp::Layer
  • source : neuralpp::NeuralNet
  • split() @@ -145,7 +145,7 @@ Here is a list of all class members with links to the classes they belong to:
  • strToEncoding : CMarkup::ConvertEncoding
  • Synapsis() -: neuralpp::Synapsis +: neuralpp::Synapsis
  • synClear() : neuralpp::Neuron
  • synIn() @@ -154,7 +154,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::Neuron -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x74.html b/doc/html/functions_0x74.html index 03c2fba..a3b2fd4 100644 --- a/doc/html/functions_0x74.html +++ b/doc/html/functions_0x74.html @@ -65,10 +65,10 @@ Here is a list of all class members with links to the classes they belong to:
  • TopIndex() : CMarkup::NodeStack
  • train() -: neuralpp::NeuralNet +: neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x75.html b/doc/html/functions_0x75.html index 8cf5051..b054513 100644 --- a/doc/html/functions_0x75.html +++ b/doc/html/functions_0x75.html @@ -74,7 +74,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x77.html b/doc/html/functions_0x77.html index 289dddc..e5741db 100644 --- a/doc/html/functions_0x77.html +++ b/doc/html/functions_0x77.html @@ -66,7 +66,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x78.html b/doc/html/functions_0x78.html index 25521a3..1bca7ae 100644 --- a/doc/html/functions_0x78.html +++ b/doc/html/functions_0x78.html @@ -164,7 +164,7 @@ Here is a list of all class members with links to the classes they belong to: : neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_0x7e.html b/doc/html/functions_0x7e.html index c20d4b7..c88e001 100644 --- a/doc/html/functions_0x7e.html +++ b/doc/html/functions_0x7e.html @@ -70,7 +70,7 @@ Here is a list of all class members with links to the classes they belong to: : CMarkup::SavedPosMapArray -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_enum.html b/doc/html/functions_enum.html index e39eaaf..8af47f7 100644 --- a/doc/html/functions_enum.html +++ b/doc/html/functions_enum.html @@ -46,7 +46,7 @@ : neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_eval.html b/doc/html/functions_eval.html index e1bb1d6..ac681b4 100644 --- a/doc/html/functions_eval.html +++ b/doc/html/functions_eval.html @@ -136,7 +136,7 @@ : neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html index 269c76f..dfc1784 100644 --- a/doc/html/functions_func.html +++ b/doc/html/functions_func.html @@ -83,7 +83,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x63.html b/doc/html/functions_func_0x63.html index 5ce256c..92c9702 100644 --- a/doc/html/functions_func_0x63.html +++ b/doc/html/functions_func_0x63.html @@ -76,7 +76,7 @@ : CMarkup::NodeStack -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x64.html b/doc/html/functions_func_0x64.html index 0d618f5..5c1e1d5 100644 --- a/doc/html/functions_func_0x64.html +++ b/doc/html/functions_func_0x64.html @@ -65,7 +65,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x65.html b/doc/html/functions_func_0x65.html index 9bf4923..c85e630 100644 --- a/doc/html/functions_func_0x65.html +++ b/doc/html/functions_func_0x65.html @@ -66,14 +66,14 @@
  • EndTagLen() : CMarkup::ElemPos
  • error() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • EscapeText() : CMarkup
  • expected() -: neuralpp::NeuralNet +: neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x66.html b/doc/html/functions_func_0x66.html index c8a3041..9b049d2 100644 --- a/doc/html/functions_func_0x66.html +++ b/doc/html/functions_func_0x66.html @@ -67,7 +67,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x67.html b/doc/html/functions_func_0x67.html index 3f2ce87..15bf42a 100644 --- a/doc/html/functions_func_0x67.html +++ b/doc/html/functions_func_0x67.html @@ -92,7 +92,7 @@
  • getOut() : neuralpp::Synapsis
  • getOutput() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • getOutputs() : neuralpp::NeuralNet
  • getPrevDelta() @@ -109,7 +109,7 @@ : neuralpp::Synapsis -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x69.html b/doc/html/functions_func_0x69.html index d48b6d6..cd11add 100644 --- a/doc/html/functions_func_0x69.html +++ b/doc/html/functions_func_0x69.html @@ -79,7 +79,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6c.html b/doc/html/functions_func_0x6c.html index 64f367f..50c4e98 100644 --- a/doc/html/functions_func_0x6c.html +++ b/doc/html/functions_func_0x6c.html @@ -58,7 +58,7 @@

    - l -

    -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6d.html b/doc/html/functions_func_0x6d.html index 5c1ad83..8c69c88 100644 --- a/doc/html/functions_func_0x6d.html +++ b/doc/html/functions_func_0x6d.html @@ -65,7 +65,7 @@ : neuralpp::Synapsis -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6e.html b/doc/html/functions_func_0x6e.html index c1b4beb..8b34015 100644 --- a/doc/html/functions_func_0x6e.html +++ b/doc/html/functions_func_0x6e.html @@ -60,7 +60,7 @@
  • NeuralNet() : neuralpp::NeuralNet
  • Neuron() -: neuralpp::Neuron +: neuralpp::Neuron
  • nIn() : neuralpp::Neuron
  • NodePos() @@ -71,7 +71,7 @@ : neuralpp::Neuron -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x6f.html b/doc/html/functions_func_0x6f.html index 57169d1..b366bff 100644 --- a/doc/html/functions_func_0x6f.html +++ b/doc/html/functions_func_0x6f.html @@ -68,7 +68,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x70.html b/doc/html/functions_func_0x70.html index 8cbef0b..f9dc823 100644 --- a/doc/html/functions_func_0x70.html +++ b/doc/html/functions_func_0x70.html @@ -69,7 +69,7 @@ : neuralpp::Neuron -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x72.html b/doc/html/functions_func_0x72.html index 68d7f7b..999fdfc 100644 --- a/doc/html/functions_func_0x72.html +++ b/doc/html/functions_func_0x72.html @@ -82,7 +82,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x73.html b/doc/html/functions_func_0x73.html index 06f1135..45bf1f0 100644 --- a/doc/html/functions_func_0x73.html +++ b/doc/html/functions_func_0x73.html @@ -60,7 +60,7 @@
  • Save() : CMarkup
  • save() -: neuralpp::NeuralNet +: neuralpp::NeuralNet
  • SavedPos() : CMarkup::SavedPos
  • SavedPosMap() @@ -108,7 +108,7 @@
  • setWeight() : neuralpp::Synapsis
  • size() -: neuralpp::Layer +: neuralpp::Layer
  • split() : neuralpp::NeuralNet
  • StartAfter() @@ -129,7 +129,7 @@ : neuralpp::Neuron -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x74.html b/doc/html/functions_func_0x74.html index d97146c..7b2b557 100644 --- a/doc/html/functions_func_0x74.html +++ b/doc/html/functions_func_0x74.html @@ -64,10 +64,10 @@
  • TopIndex() : CMarkup::NodeStack
  • train() -: neuralpp::NeuralNet +: neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x75.html b/doc/html/functions_func_0x75.html index 81154f9..3073477 100644 --- a/doc/html/functions_func_0x75.html +++ b/doc/html/functions_func_0x75.html @@ -71,7 +71,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x77.html b/doc/html/functions_func_0x77.html index 7a78959..1606d66 100644 --- a/doc/html/functions_func_0x77.html +++ b/doc/html/functions_func_0x77.html @@ -61,7 +61,7 @@ : CMarkup -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x78.html b/doc/html/functions_func_0x78.html index 2bd5188..6812e18 100644 --- a/doc/html/functions_func_0x78.html +++ b/doc/html/functions_func_0x78.html @@ -163,7 +163,7 @@ : neuralpp::NeuralNet -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_func_0x7e.html b/doc/html/functions_func_0x7e.html index 3a9a750..6d80d8e 100644 --- a/doc/html/functions_func_0x7e.html +++ b/doc/html/functions_func_0x7e.html @@ -69,7 +69,7 @@ : CMarkup::SavedPosMapArray -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index 7d38b1b..50f9515 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -68,11 +68,6 @@ : neuralpp::synrecord
  • delta : neuralpp::Synapsis -
  • deriv -: neuralpp::Neuron -, neuralpp::Synapsis -, neuralpp::NeuralNet -, neuralpp::Layer

    - e -

    -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/globals.html b/doc/html/globals.html index 0ff1eec..e18a74b 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -145,7 +145,7 @@ Here is a list of all file members with links to the files they belong to: : neural++.hpp -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index eb2daca..2dfe2ba 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -145,7 +145,7 @@ : neural++.hpp -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/index.html b/doc/html/index.html index 2be1bb0..4a42ce6 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -19,7 +19,7 @@

    Neural++ Documentation

    0.3

    -
    Generated on Sun Aug 9 11:11:17 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespaceneuralpp.html b/doc/html/namespaceneuralpp.html index 49c29fb..a3bc563 100644 --- a/doc/html/namespaceneuralpp.html +++ b/doc/html/namespaceneuralpp.html @@ -14,6 +14,12 @@
  • Files
  • +

    neuralpp Namespace Reference

    Main namespace for the library. @@ -40,10 +46,43 @@ struct  synrecord +

    Functions

    +double df (double(*f)(double), double x) +

    Detailed Description

    -Main namespace for the library.
    -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +Main namespace for the library.

    Function Documentation

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    double neuralpp::df (double(*)(double)  f,
    double  x 
    )
    +
    +
    + +

    + +

    +

    + +


    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html index 2c85f28..72c7d9c 100644 --- a/doc/html/namespaces.html +++ b/doc/html/namespaces.html @@ -14,13 +14,19 @@
  • Files
  • +

    Namespace List

    Here is a list of all namespaces with brief descriptions:
    neuralppMain namespace for the library
    -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09_8hpp-source.html b/doc/html/neural_09_09_8hpp-source.html index c0c869f..a3e4922 100644 --- a/doc/html/neural_09_09_8hpp-source.html +++ b/doc/html/neural_09_09_8hpp-source.html @@ -36,215 +36,208 @@ 00020 00021 #include <vector> 00022 #include <string> -00023 -00024 #include <cmath> -00025 #include <ctime> -00026 #include <cstdio> +00023 #include <cmath> +00024 +00025 #include "neural++_exception.hpp" +00026 using namespace std; 00027 -00028 #include "neural++_exception.hpp" -00029 using namespace std; -00030 -00032 #define RAND ( abs( sin(rand()) ) ) +00029 #define RAND (double) ( (rand() / (RAND_MAX/2)) - 1) +00030 +00032 #define BETA0 0.8 00033 -00035 #define BETA0 0.7 -00036 -00041 namespace neuralpp { -00042 class Synapsis; -00043 class Neuron; -00044 class Layer; -00045 class NeuralNet; -00046 class NetworkFileNotFoundException; -00047 class InvalidXMLException; -00048 -00053 class NeuralNet { -00054 int epochs; -00055 int ref_epochs; -00056 double l_rate; -00057 double ex; -00058 -00059 Layer* input; -00060 Layer* hidden; -00061 Layer* output; -00062 -00067 void updateWeights(); +00038 namespace neuralpp { +00039 class Synapsis; +00040 class Neuron; +00041 class Layer; +00042 class NeuralNet; +00043 +00044 double df (double (*f)(double), double x); +00045 +00050 class NeuralNet { +00051 int epochs; +00052 int ref_epochs; +00053 double l_rate; +00054 double ex; +00055 +00060 void updateWeights(); +00061 +00067 void commitChanges (Layer *l); 00068 -00074 void commitChanges (Layer *l); -00075 -00081 double error(double ex); -00082 -00087 double (*actv_f)(double); -00088 -00093 double (*deriv)(double); -00094 -00095 public: -00099 typedef enum { file, str } source; -00100 -00104 NeuralNet() {} -00105 -00116 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e); -00117 -00123 NeuralNet (const char* file) throw(NetworkFileNotFoundException); -00124 -00125 -00138 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, -00139 double(*actv)(double), double(*deriv)(double), double l, int e); -00140 -00146 double getOutput(); -00147 -00152 vector<double> getOutputs(); -00153 -00159 double expected(); -00160 -00165 void setExpected(double ex); -00166 -00172 void update(); -00173 -00178 void propagate(); -00179 -00184 void setInput (vector<double>& v); -00185 -00190 void link(); -00191 -00196 bool save(const char* fname); -00197 -00205 void train(string xml, source xrc) throw(InvalidXMLException); -00206 -00211 static void initXML (string& xml); +00074 double error(double ex) const; +00075 +00080 double (*actv_f)(double); +00081 +00082 public: +00083 Layer* input; +00084 Layer* hidden; +00085 Layer* output; +00086 +00090 typedef enum { file, str } source; +00091 +00095 NeuralNet() {} +00096 +00107 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, double l, int e); +00108 +00114 NeuralNet (const string file) throw(NetworkFileNotFoundException); +00115 +00116 +00128 NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, +00129 double(*actv)(double), double l, int e); +00130 +00136 double getOutput() const; +00137 +00142 vector<double> getOutputs(); +00143 +00149 double expected() const; +00150 +00155 void setExpected(double ex); +00156 +00162 void update(); +00163 +00168 void propagate(); +00169 +00174 void setInput (vector<double>& v); +00175 +00180 void link(); +00181 +00188 void save(const char* fname) throw(NetworkFileWriteException); +00189 +00197 void train (string xml, source src) throw(InvalidXMLException); +00198 +00203 static void initXML (string& xml); +00204 +00211 static vector<double> split (char delim, string str); 00212 -00219 static vector<double> split (char delim, string str); -00220 -00233 static string XMLFromSet (int id, string set); -00234 -00239 static void closeXML(string& xml); -00240 }; -00241 -00247 class Synapsis { -00248 double delta; -00249 double prev_delta; -00250 double weight; -00251 -00252 Neuron *in; -00253 Neuron *out; -00254 -00255 double (*actv_f)(double); -00256 double (*deriv)(double); -00257 -00258 public: -00266 Synapsis(Neuron* i, Neuron* o, double w, double d); -00267 -00275 Synapsis (Neuron* i, Neuron* o, double(*a)(double), double(*d)(double)); -00276 -00285 Synapsis (Neuron* i, Neuron* o, -00286 double w, double(*a)(double), double(*d)(double)); -00287 -00291 Neuron* getIn(); +00225 static string XMLFromSet (int id, string set); +00226 +00231 static void closeXML(string& xml); +00232 }; +00233 +00239 class Synapsis { +00240 double delta; +00241 double prev_delta; +00242 double weight; +00243 +00244 Neuron *in; +00245 Neuron *out; +00246 +00247 double (*actv_f)(double); +00248 +00249 public: +00257 Synapsis(Neuron* i, Neuron* o, double w, double d); +00258 +00265 Synapsis (Neuron* i, Neuron* o, double(*a)(double)); +00266 +00274 Synapsis (Neuron* i, Neuron* o, +00275 double w, double(*a)(double)); +00276 +00280 Neuron* getIn(); +00281 +00285 Neuron* getOut(); +00286 +00291 void setWeight(double w) throw(InvalidSynapticalWeightException); 00292 -00296 Neuron* getOut(); -00297 -00302 void setWeight(double w); -00303 -00309 void setDelta(double d); -00310 -00315 double getWeight(); -00316 -00321 double getDelta(); -00322 -00327 double getPrevDelta(); -00328 -00339 double momentum (int N, int x); -00340 }; -00341 -00347 class Neuron { -00348 double actv_val; -00349 double prop_val; -00350 -00351 vector< Synapsis > in; -00352 vector< Synapsis > out; -00353 -00354 double (*actv_f)(double); -00355 double (*deriv)(double); -00356 public: -00362 Neuron (double (*a)(double), double(*d)(double)); -00363 -00371 Neuron (vector<Synapsis> in, vector<Synapsis> out, -00372 double (*a)(double), double(*d)(double)); -00373 -00379 Synapsis& synIn (size_t i); +00298 void setDelta(double d) throw(InvalidSynapticalWeightException); +00299 +00304 double getWeight(); +00305 +00310 double getDelta(); +00311 +00316 double getPrevDelta(); +00317 +00328 double momentum (int N, int x); +00329 }; +00330 +00336 class Neuron { +00337 double actv_val; +00338 double prop_val; +00339 +00340 vector< Synapsis > in; +00341 vector< Synapsis > out; +00342 +00343 double (*actv_f)(double); +00344 +00345 public: +00350 Neuron (double (*a)(double)); +00351 +00358 Neuron (vector<Synapsis> in, vector<Synapsis> out, +00359 double (*a)(double)); +00360 +00366 Synapsis& synIn (size_t i); +00367 +00373 Synapsis& synOut (size_t i); +00374 +00379 void push_in (Synapsis& s); 00380 -00386 Synapsis& synOut (size_t i); -00387 -00392 void push_in (Synapsis& s); -00393 -00398 void push_out (Synapsis& s); -00399 -00404 void setActv (double a); -00405 -00410 void setProp (double p); -00411 -00416 double getActv(); -00417 -00422 double getProp(); -00423 -00427 double propagate(); -00428 -00433 size_t nIn(); -00434 -00439 size_t nOut(); -00440 -00444 void synClear(); -00445 }; -00446 -00452 class Layer { -00453 vector<Neuron> elements; -00454 -00455 void (*update_weights)(); -00456 double (*actv_f)(double); -00457 double (*deriv)(double); -00458 -00459 public: -00466 Layer (size_t sz, double (*a)(double), double(*d)(double)); +00385 void push_out (Synapsis& s); +00386 +00391 void setActv (double a); +00392 +00397 void setProp (double p); +00398 +00403 double getActv(); +00404 +00409 double getProp(); +00410 +00414 double propagate(); +00415 +00420 size_t nIn(); +00421 +00426 size_t nOut(); +00427 +00431 void synClear(); +00432 }; +00433 +00439 class Layer { +00440 vector<Neuron> elements; +00441 +00442 void (*update_weights)(); +00443 double (*actv_f)(double); +00444 +00445 public: +00451 Layer (size_t sz, double (*a)(double)); +00452 +00459 Layer (vector<Neuron>& neurons, double(*a)(double)); +00460 +00466 Neuron& operator[] (size_t i) throw(NetworkIndexOutOfBoundsException); 00467 -00475 Layer (vector<Neuron>& neurons, double(*a)(double), double(*d)(double)); -00476 -00482 Neuron& operator[] (size_t i); -00483 -00488 void link (Layer& l); -00489 -00494 void setProp (vector<double>& v); -00495 -00500 void setActv (vector<double>& v); +00472 void link (Layer& l); +00473 +00478 void setProp (vector<double>& v); +00479 +00484 void setActv (vector<double>& v); +00485 +00489 void propagate(); +00490 +00494 size_t size() const; +00495 }; +00496 +00497 struct netrecord { +00498 int input_size; +00499 int hidden_size; +00500 int output_size; 00501 -00505 void propagate(); +00502 int epochs; +00503 double l_rate; +00504 double ex; +00505 }; 00506 -00510 size_t size(); -00511 }; -00512 -00513 struct netrecord { -00514 int input_size; -00515 int hidden_size; -00516 int output_size; +00507 struct neuronrecord { +00508 double prop; +00509 double actv; +00510 }; +00511 +00512 struct synrecord { +00513 double w; +00514 double d; +00515 }; +00516 } 00517 -00518 int epochs; -00519 double l_rate; -00520 double ex; -00521 }; -00522 -00523 struct neuronrecord { -00524 double prop; -00525 double actv; -00526 }; -00527 -00528 struct synrecord { -00529 double w; -00530 double d; -00531 }; -00532 } -00533 -00534 #endif -00535 //#endif -00536 +00518 //#endif +00519 #endif +00520 -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09_8hpp.html b/doc/html/neural_09_09_8hpp.html index c94dbe2..762cba0 100644 --- a/doc/html/neural_09_09_8hpp.html +++ b/doc/html/neural_09_09_8hpp.html @@ -19,8 +19,6 @@

    neural++.hpp File Reference

    #include <vector>
    #include <string>
    #include <cmath>
    -#include <ctime>
    -#include <cstdio>
    #include "neural++_exception.hpp"

    @@ -49,12 +47,15 @@ struct  neuralpp::synrecord

    Defines

    -#define RAND   ( abs( sin(rand()) ) ) +#define RAND   (double) ( (rand() / (RAND_MAX/2)) - 1)  Default rand value: |sin(rand)|, always >= 0 and <= 1.
    -#define BETA0   0.7 +#define BETA0   0.8  Initial value for the inertial momentum of the synapses.
    +

    Functions

    +double neuralpp::df (double(*f)(double), double x) +

    Define Documentation

    @@ -62,7 +63,7 @@
    - +
    #define BETA0   0.7 #define BETA0   0.8
    @@ -79,7 +80,7 @@ Initial value for the inertial momentum of the synapses.
    - +
    #define RAND   ( abs( sin(rand()) ) ) #define RAND   (double) ( (rand() / (RAND_MAX/2)) - 1)
    @@ -92,7 +93,7 @@ Default rand value: |sin(rand)|, always >= 0 and <= 1.

    -


    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09__exception_8hpp-source.html b/doc/html/neural_09_09__exception_8hpp-source.html index 5cd9e65..043f639 100644 --- a/doc/html/neural_09_09__exception_8hpp-source.html +++ b/doc/html/neural_09_09__exception_8hpp-source.html @@ -43,18 +43,36 @@ 00031 const char* what() const throw() { return "Attempt to load a neural network from an invalid network file"; } 00032 }; 00033 -00038 class InvalidXMLException : public std::exception { -00039 public: -00040 InvalidXMLException() {} -00041 const char* what() const throw() { return "Attempt to load an invalid XML file"; } -00042 }; -00043 } +00039 class NetworkFileWriteException : public std::exception { +00040 public: +00041 NetworkFileWriteException() {} +00042 const char* what() const throw() { return "There was an error while writing the network file"; } +00043 }; 00044 -00045 #endif -00046 #endif -00047 +00049 class InvalidXMLException : public std::exception { +00050 public: +00051 InvalidXMLException() {} +00052 const char* what() const throw() { return "Attempt to load an invalid XML file"; } +00053 }; +00054 +00060 class NetworkIndexOutOfBoundsException : public std::exception { +00061 public: +00062 NetworkIndexOutOfBoundsException() {} +00063 const char* what() const throw() { return "Attempt to access a non-existing neuron"; } +00064 }; +00065 +00071 class InvalidSynapticalWeightException : public std::exception { +00072 public: +00073 InvalidSynapticalWeightException() {} +00074 const char* what() const throw() { return "Attempt to set an invalid weight for the synapsis"; } +00075 }; +00076 } +00077 +00078 #endif +00079 #endif +00080 -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/neural_09_09__exception_8hpp.html b/doc/html/neural_09_09__exception_8hpp.html index a6e5398..8f1cd5a 100644 --- a/doc/html/neural_09_09__exception_8hpp.html +++ b/doc/html/neural_09_09__exception_8hpp.html @@ -22,7 +22,7 @@ -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ConvertEncoding-members.html b/doc/html/structCMarkup_1_1ConvertEncoding-members.html index 8689a02..f7dedc1 100644 --- a/doc/html/structCMarkup_1_1ConvertEncoding-members.html +++ b/doc/html/structCMarkup_1_1ConvertEncoding-members.html @@ -31,7 +31,7 @@ strFromEncodingCMarkup::ConvertEncoding strToEncodingCMarkup::ConvertEncoding -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ConvertEncoding.html b/doc/html/structCMarkup_1_1ConvertEncoding.html index 1d38e61..01239de 100644 --- a/doc/html/structCMarkup_1_1ConvertEncoding.html +++ b/doc/html/structCMarkup_1_1ConvertEncoding.html @@ -197,7 +197,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ElemPos-members.html b/doc/html/structCMarkup_1_1ElemPos-members.html index 549c089..d3dc0d5 100644 --- a/doc/html/structCMarkup_1_1ElemPos-members.html +++ b/doc/html/structCMarkup_1_1ElemPos-members.html @@ -47,7 +47,7 @@ StartContent() const CMarkup::ElemPos [inline] StartTagLen() const CMarkup::ElemPos [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1ElemPos.html b/doc/html/structCMarkup_1_1ElemPos.html index bdd2d5f..eb3fcf6 100644 --- a/doc/html/structCMarkup_1_1ElemPos.html +++ b/doc/html/structCMarkup_1_1ElemPos.html @@ -527,7 +527,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1FilePos-members.html b/doc/html/structCMarkup_1_1FilePos-members.html index 49e4b86..b95b624 100644 --- a/doc/html/structCMarkup_1_1FilePos-members.html +++ b/doc/html/structCMarkup_1_1FilePos-members.html @@ -33,7 +33,7 @@ strEncodingCMarkup::FilePos strIOResultCMarkup::FilePos -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1FilePos.html b/doc/html/structCMarkup_1_1FilePos.html index 64f6923..1c8ab38 100644 --- a/doc/html/structCMarkup_1_1FilePos.html +++ b/doc/html/structCMarkup_1_1FilePos.html @@ -195,7 +195,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodePos-members.html b/doc/html/structCMarkup_1_1NodePos-members.html index 06a5d7c..4c80962 100644 --- a/doc/html/structCMarkup_1_1NodePos-members.html +++ b/doc/html/structCMarkup_1_1NodePos-members.html @@ -31,7 +31,7 @@ nStartCMarkup::NodePos strMetaCMarkup::NodePos -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodePos.html b/doc/html/structCMarkup_1_1NodePos.html index 0f8994b..1f691eb 100644 --- a/doc/html/structCMarkup_1_1NodePos.html +++ b/doc/html/structCMarkup_1_1NodePos.html @@ -176,7 +176,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodeStack-members.html b/doc/html/structCMarkup_1_1NodeStack-members.html index 6ade728..1e7c27d 100644 --- a/doc/html/structCMarkup_1_1NodeStack-members.html +++ b/doc/html/structCMarkup_1_1NodeStack-members.html @@ -36,7 +36,7 @@ TopIndex()CMarkup::NodeStack [inline] ~NodeStack()CMarkup::NodeStack [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1NodeStack.html b/doc/html/structCMarkup_1_1NodeStack.html index de33c7f..9274dea 100644 --- a/doc/html/structCMarkup_1_1NodeStack.html +++ b/doc/html/structCMarkup_1_1NodeStack.html @@ -309,7 +309,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1PosArray-members.html b/doc/html/structCMarkup_1_1PosArray-members.html index 9bc8a5d..e33c402 100644 --- a/doc/html/structCMarkup_1_1PosArray-members.html +++ b/doc/html/structCMarkup_1_1PosArray-members.html @@ -37,7 +37,7 @@ SegsUsed() const CMarkup::PosArray [inline] ~PosArray()CMarkup::PosArray [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1PosArray.html b/doc/html/structCMarkup_1_1PosArray.html index eee7692..f955be2 100644 --- a/doc/html/structCMarkup_1_1PosArray.html +++ b/doc/html/structCMarkup_1_1PosArray.html @@ -316,7 +316,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPos-members.html b/doc/html/structCMarkup_1_1SavedPos-members.html index e1b901c..e8229f4 100644 --- a/doc/html/structCMarkup_1_1SavedPos-members.html +++ b/doc/html/structCMarkup_1_1SavedPos-members.html @@ -32,7 +32,7 @@ SPM_USED enum valueCMarkup::SavedPos strNameCMarkup::SavedPos -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPos.html b/doc/html/structCMarkup_1_1SavedPos.html index 5e536b6..d5a98a7 100644 --- a/doc/html/structCMarkup_1_1SavedPos.html +++ b/doc/html/structCMarkup_1_1SavedPos.html @@ -145,7 +145,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMap-members.html b/doc/html/structCMarkup_1_1SavedPosMap-members.html index e300f0e..1f5b12d 100644 --- a/doc/html/structCMarkup_1_1SavedPosMap-members.html +++ b/doc/html/structCMarkup_1_1SavedPosMap-members.html @@ -28,7 +28,7 @@ SavedPosMap(int nSize)CMarkup::SavedPosMap [inline] ~SavedPosMap()CMarkup::SavedPosMap [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMap.html b/doc/html/structCMarkup_1_1SavedPosMap.html index 1108591..a001d66 100644 --- a/doc/html/structCMarkup_1_1SavedPosMap.html +++ b/doc/html/structCMarkup_1_1SavedPosMap.html @@ -123,7 +123,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMapArray-members.html b/doc/html/structCMarkup_1_1SavedPosMapArray-members.html index 9ebe416..e56796e 100644 --- a/doc/html/structCMarkup_1_1SavedPosMapArray-members.html +++ b/doc/html/structCMarkup_1_1SavedPosMapArray-members.html @@ -28,7 +28,7 @@ SavedPosMapArray()CMarkup::SavedPosMapArray [inline] ~SavedPosMapArray()CMarkup::SavedPosMapArray [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1SavedPosMapArray.html b/doc/html/structCMarkup_1_1SavedPosMapArray.html index bbc4787..1552b42 100644 --- a/doc/html/structCMarkup_1_1SavedPosMapArray.html +++ b/doc/html/structCMarkup_1_1SavedPosMapArray.html @@ -129,7 +129,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1TokenPos-members.html b/doc/html/structCMarkup_1_1TokenPos-members.html index 3be8d9b..b9cf0f0 100644 --- a/doc/html/structCMarkup_1_1TokenPos-members.html +++ b/doc/html/structCMarkup_1_1TokenPos-members.html @@ -36,7 +36,7 @@ StrNIACmp(MCD_PCSZ p1, MCD_PCSZ p2, int n)CMarkup::TokenPos [inline] TokenPos(MCD_CSTR sz, int n)CMarkup::TokenPos [inline] -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structCMarkup_1_1TokenPos.html b/doc/html/structCMarkup_1_1TokenPos.html index af79f70..dfc28d1 100644 --- a/doc/html/structCMarkup_1_1TokenPos.html +++ b/doc/html/structCMarkup_1_1TokenPos.html @@ -314,7 +314,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structMCD__CSTR-members.html b/doc/html/structMCD__CSTR-members.html index df7d5e1..09d60a8 100644 --- a/doc/html/structMCD__CSTR-members.html +++ b/doc/html/structMCD__CSTR-members.html @@ -29,7 +29,7 @@ operator MCD_PCSZ() const MCD_CSTR [inline] pcszMCD_CSTR -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structMCD__CSTR.html b/doc/html/structMCD__CSTR.html index 4c5bf00..c59df78 100644 --- a/doc/html/structMCD__CSTR.html +++ b/doc/html/structMCD__CSTR.html @@ -148,7 +148,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1netrecord-members.html b/doc/html/structneuralpp_1_1netrecord-members.html index 0466724..ab530fb 100644 --- a/doc/html/structneuralpp_1_1netrecord-members.html +++ b/doc/html/structneuralpp_1_1netrecord-members.html @@ -30,7 +30,7 @@ l_rateneuralpp::netrecord output_sizeneuralpp::netrecord -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1netrecord.html b/doc/html/structneuralpp_1_1netrecord.html index 6abec21..7311371 100644 --- a/doc/html/structneuralpp_1_1netrecord.html +++ b/doc/html/structneuralpp_1_1netrecord.html @@ -138,7 +138,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1neuronrecord-members.html b/doc/html/structneuralpp_1_1neuronrecord-members.html index 7fc84a7..249d14e 100644 --- a/doc/html/structneuralpp_1_1neuronrecord-members.html +++ b/doc/html/structneuralpp_1_1neuronrecord-members.html @@ -26,7 +26,7 @@ actvneuralpp::neuronrecord propneuralpp::neuronrecord -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1neuronrecord.html b/doc/html/structneuralpp_1_1neuronrecord.html index c9c63e3..dca1bde 100644 --- a/doc/html/structneuralpp_1_1neuronrecord.html +++ b/doc/html/structneuralpp_1_1neuronrecord.html @@ -70,7 +70,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1synrecord-members.html b/doc/html/structneuralpp_1_1synrecord-members.html index c78398a..624237b 100644 --- a/doc/html/structneuralpp_1_1synrecord-members.html +++ b/doc/html/structneuralpp_1_1synrecord-members.html @@ -26,7 +26,7 @@ dneuralpp::synrecord wneuralpp::synrecord -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/html/structneuralpp_1_1synrecord.html b/doc/html/structneuralpp_1_1synrecord.html index 29940bd..4999ce1 100644 --- a/doc/html/structneuralpp_1_1synrecord.html +++ b/doc/html/structneuralpp_1_1synrecord.html @@ -70,7 +70,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Sun Aug 9 11:11:18 2009 for Neural++ by  +
    Generated on Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6
    diff --git a/doc/latex/classneuralpp_1_1Layer.tex b/doc/latex/classneuralpp_1_1Layer.tex index f10c278..22b3e76 100644 --- a/doc/latex/classneuralpp_1_1Layer.tex +++ b/doc/latex/classneuralpp_1_1Layer.tex @@ -8,11 +8,11 @@ Class for managing layers of neurons. \subsection*{Public Member Functions} \begin{CompactItemize} \item -{\bf Layer} (size\_\-t sz, double($\ast$a)(double), double($\ast$d)(double)) +{\bf Layer} (size\_\-t sz, double($\ast$a)(double)) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Layer} (vector$<$ {\bf Neuron} $>$ \&neurons, double($\ast$a)(double), double($\ast$d)(double)) +{\bf Layer} (vector$<$ {\bf Neuron} $>$ \&neurons, double($\ast$a)(double)) \begin{CompactList}\small\item\em Alternative constructor. \item\end{CompactList}\item -{\bf Neuron} \& {\bf operator[$\,$]} (size\_\-t i) +{\bf Neuron} \& {\bf operator[$\,$]} (size\_\-t i) throw (NetworkIndexOutOfBoundsException) \begin{CompactList}\small\item\em Redefinition for operator []. \item\end{CompactList}\item void {\bf link} ({\bf Layer} \&l) \begin{CompactList}\small\item\em It links a layer to another. \item\end{CompactList}\item @@ -22,7 +22,7 @@ void {\bf setActv} (vector$<$ double $>$ \&v) \begin{CompactList}\small\item\em It sets a vector of activation values to all its neurons. \item\end{CompactList}\item void {\bf propagate} () \begin{CompactList}\small\item\em It propagates its activation values to the output layers. \item\end{CompactList}\item -size\_\-t {\bf size} () +size\_\-t {\bf size} () const \end{CompactItemize} \subsection*{Private Attributes} \begin{CompactItemize} @@ -32,8 +32,6 @@ vector$<$ {\bf Neuron} $>$ {\bf elements} void($\ast$ {\bf update\_\-weights} )() \item double($\ast$ {\bf actv\_\-f} )(double) -\item -double($\ast$ {\bf deriv} )(double) \end{CompactItemize} @@ -45,7 +43,7 @@ Don't use this class directly unless you know what you're doing, use \doxyref{Ne \subsection{Constructor \& Destructor Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (size\_\-t {\em sz}, \/ double($\ast$)(double) {\em a}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Layer_411a4dc8a1bb2fe44fe7a69fa50fd764} +\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (size\_\-t {\em sz}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Layer_fb08bddd85d36570dabfe915461f07c5} Constructor. @@ -53,11 +51,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em sz}]Size of the layer \item[{\em a}]Activation function \item[{\em d}]Its derivate \end{description} +\item[{\em sz}]Size of the layer \item[{\em a}]Activation function \end{description} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (vector$<$ {\bf Neuron} $>$ \& {\em neurons}, \/ double($\ast$)(double) {\em a}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Layer_117d1c3b481641816e80ea36826d2107} +\subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (vector$<$ {\bf Neuron} $>$ \& {\em neurons}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Layer_609ed16b8d79dc384b01ba7d16b72bd1} Alternative constructor. @@ -65,14 +63,14 @@ Alternative constructor. It directly gets a vector of neurons to build the layer \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em neurons}]Vector of neurons to be included in the layer \item[{\em a}]Activation function \item[{\em d}]Its derivate \end{description} +\item[{\em neurons}]Vector of neurons to be included in the layer \item[{\em a}]Activation function \end{description} \end{Desc} \subsection{Member Function Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!operator[]@{operator[]}} \index{operator[]@{operator[]}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[operator[]]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}\& neuralpp::Layer::operator[$\,$] (size\_\-t {\em i})}\label{classneuralpp_1_1Layer_45ff7554830558155c6fbce3b6827122} +\subsubsection[operator[]]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}\& neuralpp::Layer::operator[$\,$] (size\_\-t {\em i}) throw (NetworkIndexOutOfBoundsException)}\label{classneuralpp_1_1Layer_45ff7554830558155c6fbce3b6827122} Redefinition for operator []. @@ -129,7 +127,7 @@ It propagates its activation values to the output layers. \index{neuralpp::Layer@{neuralpp::Layer}!size@{size}} \index{size@{size}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[size]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t neuralpp::Layer::size ()}\label{classneuralpp_1_1Layer_c8d2f7513e5d40518f9dddfd1e3ddcc5} +\subsubsection[size]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t neuralpp::Layer::size () const}\label{classneuralpp_1_1Layer_7ca71ed62fbe9c1e9c0fb6a8dcaf76f0} \begin{Desc} @@ -152,11 +150,6 @@ It propagates its activation values to the output layers. \subsubsection[actv\_\-f]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Layer::actv\_\-f})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_824367da29f92253a027a7c5b4a4405e} -\index{neuralpp::Layer@{neuralpp::Layer}!deriv@{deriv}} -\index{deriv@{deriv}!neuralpp::Layer@{neuralpp::Layer}} -\subsubsection[deriv]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Layer::deriv})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_a0207b14ba80aaf03502749ecb7d23fa} - - The documentation for this class was generated from the following file:\begin{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1NeuralNet.tex b/doc/latex/classneuralpp_1_1NeuralNet.tex index 5eea20d..9db1493 100644 --- a/doc/latex/classneuralpp_1_1NeuralNet.tex +++ b/doc/latex/classneuralpp_1_1NeuralNet.tex @@ -19,15 +19,15 @@ enum {\bf source} \{ {\bf file}, \begin{CompactList}\small\item\em Empty constructor for the class - it just makes nothing. \item\end{CompactList}\item {\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double l, int e) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf NeuralNet} (const char $\ast$file) throw (NetworkFileNotFoundException) +{\bf NeuralNet} (const string file) throw (NetworkFileNotFoundException) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double($\ast$actv)(double), double($\ast${\bf deriv})(double), double l, int e) +{\bf NeuralNet} (size\_\-t in\_\-size, size\_\-t hidden\_\-size, size\_\-t out\_\-size, double($\ast$actv)(double), double l, int e) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -double {\bf getOutput} () +double {\bf getOutput} () const \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 vector$<$ double $>$ {\bf getOutputs} () \begin{CompactList}\small\item\em It gets the output of the network in case the output layer contains more neurons. \item\end{CompactList}\item -double {\bf expected} () +double {\bf expected} () const \begin{CompactList}\small\item\em It gets the value expected. \item\end{CompactList}\item void {\bf setExpected} (double {\bf ex}) \begin{CompactList}\small\item\em It sets the value you expect from your network. \item\end{CompactList}\item @@ -39,9 +39,9 @@ void {\bf setInput} (vector$<$ double $>$ \&v) \begin{CompactList}\small\item\em It sets the input for the network. \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}\item -bool {\bf save} (const char $\ast$fname) +void {\bf save} (const char $\ast$fname) throw (NetworkFileWriteException) \begin{CompactList}\small\item\em Save a trained neural network to a binary file. \item\end{CompactList}\item -void {\bf train} (string xml, {\bf source} xrc) throw (InvalidXMLException) +void {\bf train} (string xml, {\bf source} src) throw (InvalidXMLException) \begin{CompactList}\small\item\em Train a network using a training set loaded from an XML file. \item\end{CompactList}\end{CompactItemize} \subsection*{Static Public Member Functions} \begin{CompactItemize} @@ -54,6 +54,15 @@ static string {\bf XMLFromSet} (int id, string set) \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 static void {\bf closeXML} (string \&xml) \begin{CompactList}\small\item\em Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\"{}XMLFromSet\char`\"{}. \item\end{CompactList}\end{CompactItemize} +\subsection*{Public Attributes} +\begin{CompactItemize} +\item +{\bf Layer} $\ast$ {\bf input} +\item +{\bf Layer} $\ast$ {\bf hidden} +\item +{\bf Layer} $\ast$ {\bf output} +\end{CompactItemize} \subsection*{Private Member Functions} \begin{CompactItemize} \item @@ -61,8 +70,8 @@ void {\bf updateWeights} () \begin{CompactList}\small\item\em It updates the weights of the net's synapsis through back-propagation. \item\end{CompactList}\item void {\bf commitChanges} ({\bf Layer} $\ast$l) \begin{CompactList}\small\item\em It commits the changes made by \doxyref{updateWeights()}{p.}{classneuralpp_1_1NeuralNet_94169c89a7cd47122ab5dbf1d5c5e108} to the layer l. \item\end{CompactList}\item -double {\bf error} (double {\bf ex}) -\begin{CompactList}\small\item\em It get the error made on the expected result as $|$v-v'$|$/v. \item\end{CompactList}\end{CompactItemize} +double {\bf error} (double {\bf ex}) const +\begin{CompactList}\small\item\em Get the error made on the expected result as $|$v-v'$|$/v. \item\end{CompactList}\end{CompactItemize} \subsection*{Private Attributes} \begin{CompactItemize} \item @@ -74,16 +83,8 @@ double {\bf l\_\-rate} \item double {\bf ex} \item -{\bf Layer} $\ast$ {\bf input} -\item -{\bf Layer} $\ast$ {\bf hidden} -\item -{\bf Layer} $\ast$ {\bf output} -\item double($\ast$ {\bf actv\_\-f} )(double) -\begin{CompactList}\small\item\em Private pointer to function, containing the function to be used as activation function. \item\end{CompactList}\item -double($\ast$ {\bf deriv} )(double) -\begin{CompactList}\small\item\em Private pointer to function, containing the function to be used as derivate of the activation function. \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} \subsection{Detailed Description} @@ -133,7 +134,7 @@ Constructor. \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!NeuralNet@{NeuralNet}} \index{NeuralNet@{NeuralNet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (const char $\ast$ {\em file}) throw (NetworkFileNotFoundException)}\label{classneuralpp_1_1NeuralNet_88380cb002edcccf11b59f6d3f6c94c9} +\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (const string {\em file}) throw (NetworkFileNotFoundException)}\label{classneuralpp_1_1NeuralNet_7fc7fc3e3220c138ffa5356fef6b9757} Constructor. @@ -141,7 +142,7 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em file}]Binary file containing a neural network previously saved by \doxyref{save()}{p.}{classneuralpp_1_1NeuralNet_5db8d6ba4785f732da6e642b4f8f11a0} method \end{description} +\item[{\em file}]Binary file containing a neural network previously saved by \doxyref{save()}{p.}{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} method \end{description} \end{Desc} \begin{Desc} \item[Exceptions:] @@ -150,7 +151,7 @@ Constructor. \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!NeuralNet@{NeuralNet}} \index{NeuralNet@{NeuralNet}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (size\_\-t {\em in\_\-size}, \/ size\_\-t {\em hidden\_\-size}, \/ size\_\-t {\em out\_\-size}, \/ double($\ast$)(double) {\em actv}, \/ double($\ast$)(double) {\em deriv}, \/ double {\em l}, \/ int {\em e})}\label{classneuralpp_1_1NeuralNet_b4b261f7f7fa93c45855288fd66cfdca} +\subsubsection[NeuralNet]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::NeuralNet::NeuralNet (size\_\-t {\em in\_\-size}, \/ size\_\-t {\em hidden\_\-size}, \/ size\_\-t {\em out\_\-size}, \/ double($\ast$)(double) {\em actv}, \/ double {\em l}, \/ int {\em e})}\label{classneuralpp_1_1NeuralNet_0c16df2e0701503052c63749930b238e} Constructor. @@ -158,7 +159,7 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\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 actv}]Activation function to use (default: f(x)=x) \item[{\em deriv}]Derivate for the activation function to use (default: f'(x)=1) \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) \end{description} +\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 actv}]Activation function to use (default: f(x)=x) \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) \end{description} \end{Desc} @@ -184,10 +185,10 @@ In-class use only \begin{Desc} \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!error@{error}} \index{error@{error}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[error]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::error (double {\em ex})\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_8a140d28e6dd4097470c7c138801ad01} +\subsubsection[error]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::error (double {\em ex}) const\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_0616c51404efaca2714e37dd7478997e} -It get the error made on the expected result as $|$v-v'$|$/v. +Get the error made on the expected result as $|$v-v'$|$/v. \begin{Desc} \item[Parameters:] @@ -198,7 +199,7 @@ It get the error made on the expected result as $|$v-v'$|$/v. \item[Returns:]Mean error \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!getOutput@{getOutput}} \index{getOutput@{getOutput}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[getOutput]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::getOutput ()}\label{classneuralpp_1_1NeuralNet_7de7ee318eeb791d21a01e9e9e0e8c5a} +\subsubsection[getOutput]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::getOutput () const}\label{classneuralpp_1_1NeuralNet_961dce8913264bf64c899dce4e25f810} It gets the output of the network (note: the layer output should contain an only neuron). @@ -216,7 +217,7 @@ It gets the output of the network in case the output layer contains more neurons \item[Returns:]A vector containing the output values of the network \end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!expected@{expected}} \index{expected@{expected}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[expected]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::expected ()}\label{classneuralpp_1_1NeuralNet_423fd38a61d79905dcc12da84c805114} +\subsubsection[expected]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::NeuralNet::expected () const}\label{classneuralpp_1_1NeuralNet_562dfe9fb8d73bf25a23ce608451d3aa} It gets the value expected. @@ -270,7 +271,7 @@ It links the layers of the network (input, hidden, output). Don't use unless you exactly know what you're doing, it is already called by the constructor \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!save@{save}} \index{save@{save}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[save]{\setlength{\rightskip}{0pt plus 5cm}bool neuralpp::NeuralNet::save (const char $\ast$ {\em fname})}\label{classneuralpp_1_1NeuralNet_5db8d6ba4785f732da6e642b4f8f11a0} +\subsubsection[save]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::save (const char $\ast$ {\em fname}) throw (NetworkFileWriteException)}\label{classneuralpp_1_1NeuralNet_fdf94c276720c25e565cac834fe8a407} Save a trained neural network to a binary file. @@ -280,9 +281,14 @@ Save a trained neural network to a binary file. \begin{description} \item[{\em fname}]Binary file where you're going to save your network \end{description} \end{Desc} +\begin{Desc} +\item[Exceptions:] +\begin{description} +\item[{\em NetworkFileWriteException}]When you get an error writing the network's information to a file \end{description} +\end{Desc} \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!train@{train}} \index{train@{train}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[train]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::train (string {\em xml}, \/ {\bf source} {\em xrc}) throw (InvalidXMLException)}\label{classneuralpp_1_1NeuralNet_e8b8741d28bec1354db555eabe418cb6} +\subsubsection[train]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::NeuralNet::train (string {\em xml}, \/ {\bf source} {\em src}) throw (InvalidXMLException)}\label{classneuralpp_1_1NeuralNet_ead4bdef0602a5cadbe3beb685e01f5f} Train a network using a training set loaded from an XML file. @@ -372,21 +378,6 @@ Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\ \subsubsection[ex]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::NeuralNet::ex}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_261f5f68fcc5be54250cfa03945266dd} -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!input@{input}} -\index{input@{input}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[input]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::input}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_e2b4e8405f9d25edab395d61502bdba9} - - -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!hidden@{hidden}} -\index{hidden@{hidden}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[hidden]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::hidden}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_bbdaa1b6c0a1a95d2b18cd25fda2a266} - - -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!output@{output}} -\index{output@{output}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[output]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::output}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_fa9b2dbcbb39d0fc70f790ac24069a74} - - \index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!actv\_\-f@{actv\_\-f}} \index{actv\_\-f@{actv\_\-f}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} \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} @@ -394,12 +385,20 @@ Closes an open XML document generated by \char`\"{}initXML\char`\"{} and \char`\ Private pointer to function, containing the function to be used as activation function. -\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!deriv@{deriv}} -\index{deriv@{deriv}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} -\subsubsection[deriv]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::NeuralNet::deriv})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1NeuralNet_df44689f4e6201ca1ddc67655cce3576} +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!input@{input}} +\index{input@{input}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[input]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::input}}\label{classneuralpp_1_1NeuralNet_e2b4e8405f9d25edab395d61502bdba9} -Private pointer to function, containing the function to be used as derivate of the activation function. +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!hidden@{hidden}} +\index{hidden@{hidden}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[hidden]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::hidden}}\label{classneuralpp_1_1NeuralNet_bbdaa1b6c0a1a95d2b18cd25fda2a266} + + +\index{neuralpp::NeuralNet@{neuralpp::NeuralNet}!output@{output}} +\index{output@{output}!neuralpp::NeuralNet@{neuralpp::NeuralNet}} +\subsubsection[output]{\setlength{\rightskip}{0pt plus 5cm}{\bf Layer}$\ast$ {\bf neuralpp::NeuralNet::output}}\label{classneuralpp_1_1NeuralNet_fa9b2dbcbb39d0fc70f790ac24069a74} + diff --git a/doc/latex/classneuralpp_1_1Neuron.tex b/doc/latex/classneuralpp_1_1Neuron.tex index a7d5f0b..adcafd5 100644 --- a/doc/latex/classneuralpp_1_1Neuron.tex +++ b/doc/latex/classneuralpp_1_1Neuron.tex @@ -8,9 +8,9 @@ Class for managing neurons. \subsection*{Public Member Functions} \begin{CompactItemize} \item -{\bf Neuron} (double($\ast$a)(double), double($\ast$d)(double)) +{\bf Neuron} (double($\ast$a)(double)) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Neuron} (vector$<$ {\bf Synapsis} $>$ {\bf in}, vector$<$ {\bf Synapsis} $>$ {\bf out}, double($\ast$a)(double), double($\ast$d)(double)) +{\bf Neuron} (vector$<$ {\bf Synapsis} $>$ {\bf in}, vector$<$ {\bf Synapsis} $>$ {\bf out}, double($\ast$a)(double)) \begin{CompactList}\small\item\em Alternative constructor, that gets also the synapsis linked to the neuron. \item\end{CompactList}\item {\bf Synapsis} \& {\bf synIn} (size\_\-t i) \begin{CompactList}\small\item\em Get the i-th synapsis connected on the input of the neuron. \item\end{CompactList}\item @@ -48,8 +48,6 @@ vector$<$ {\bf Synapsis} $>$ {\bf in} vector$<$ {\bf Synapsis} $>$ {\bf out} \item double($\ast$ {\bf actv\_\-f} )(double) -\item -double($\ast$ {\bf deriv} )(double) \end{CompactItemize} @@ -61,7 +59,7 @@ Don't use this class directly unless you know what you're doing, use \doxyref{Ne \subsection{Constructor \& Destructor Documentation} \index{neuralpp::Neuron@{neuralpp::Neuron}!Neuron@{Neuron}} \index{Neuron@{Neuron}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (double($\ast$)(double) {\em a}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Neuron_c877424a295478e3464046ea43c2a7ad} +\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Neuron_9863a08b73bc97c8b514aca6c580ff7b} Constructor. @@ -69,11 +67,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em a}]Activation function \item[{\em d}]Its derivate \end{description} +\item[{\em a}]Activation function \end{description} \end{Desc} \index{neuralpp::Neuron@{neuralpp::Neuron}!Neuron@{Neuron}} \index{Neuron@{Neuron}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (vector$<$ {\bf Synapsis} $>$ {\em in}, \/ vector$<$ {\bf Synapsis} $>$ {\em out}, \/ double($\ast$)(double) {\em a}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Neuron_e25546d4f7126f106c2f3b2d8ed2c792} +\subsubsection[Neuron]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Neuron::Neuron (vector$<$ {\bf Synapsis} $>$ {\em in}, \/ vector$<$ {\bf Synapsis} $>$ {\em out}, \/ double($\ast$)(double) {\em a})}\label{classneuralpp_1_1Neuron_f1bf19ec93174f60b368ee4a91b03f46} Alternative constructor, that gets also the synapsis linked to the neuron. @@ -81,7 +79,7 @@ Alternative constructor, that gets also the synapsis linked to the neuron. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em in}]Input synapses \item[{\em out}]Output synapses \item[{\em a}]Activation function \item[{\em d}]Derivate of the activation function \end{description} +\item[{\em in}]Input synapses \item[{\em out}]Output synapses \item[{\em a}]Activation function \end{description} \end{Desc} @@ -240,11 +238,6 @@ Remove input and output synapsis from a neuron. \subsubsection[actv\_\-f]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Neuron::actv\_\-f})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_198ddd0d11a26d0052d52b787d6a0df0} -\index{neuralpp::Neuron@{neuralpp::Neuron}!deriv@{deriv}} -\index{deriv@{deriv}!neuralpp::Neuron@{neuralpp::Neuron}} -\subsubsection[deriv]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Neuron::deriv})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Neuron_8b881889e40e9782c49b0efad2b1dde3} - - The documentation for this class was generated from the following file:\begin{CompactItemize} diff --git a/doc/latex/classneuralpp_1_1Synapsis.tex b/doc/latex/classneuralpp_1_1Synapsis.tex index 1f0a917..58272de 100644 --- a/doc/latex/classneuralpp_1_1Synapsis.tex +++ b/doc/latex/classneuralpp_1_1Synapsis.tex @@ -10,17 +10,17 @@ Class for managing synapsis. \item {\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double w, double d) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double($\ast$a)(double), double($\ast$d)(double)) +{\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double($\ast$a)(double)) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item -{\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double w, double($\ast$a)(double), double($\ast$d)(double)) +{\bf Synapsis} ({\bf Neuron} $\ast$i, {\bf Neuron} $\ast$o, double w, double($\ast$a)(double)) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item {\bf Neuron} $\ast$ {\bf getIn} () \item {\bf Neuron} $\ast$ {\bf getOut} () \item -void {\bf setWeight} (double w) +void {\bf setWeight} (double w) throw (InvalidSynapticalWeightException) \begin{CompactList}\small\item\em Set the weight of the synapsis. \item\end{CompactList}\item -void {\bf setDelta} (double d) +void {\bf setDelta} (double d) throw (InvalidSynapticalWeightException) \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 double {\bf getWeight} () \begin{CompactList}\small\item\em Return the weight of the synapsis. \item\end{CompactList}\item @@ -44,8 +44,6 @@ double {\bf weight} {\bf Neuron} $\ast$ {\bf out} \item double($\ast$ {\bf actv\_\-f} )(double) -\item -double($\ast$ {\bf deriv} )(double) \end{CompactItemize} @@ -69,7 +67,7 @@ Constructor. \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!Synapsis@{Synapsis}} \index{Synapsis@{Synapsis}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\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}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Synapsis_a75e0de57380141973c46dd83d9985e2} +\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} Constructor. @@ -77,11 +75,11 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em i}]Input neuron \item[{\em o}]Output neuron \item[{\em a}]Activation function \item[{\em d}]Derivate for activation function \end{description} +\item[{\em i}]Input neuron \item[{\em o}]Output neuron \item[{\em a}]Activation function \end{description} \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!Synapsis@{Synapsis}} \index{Synapsis@{Synapsis}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\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}, \/ double($\ast$)(double) {\em d})}\label{classneuralpp_1_1Synapsis_3b9714684c845beae5b3474428509663} +\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} Constructor. @@ -89,7 +87,7 @@ Constructor. \begin{Desc} \item[Parameters:] \begin{description} -\item[{\em i}]Input neuron \item[{\em o}]Output neuron \item[{\em w}]Weight for the synapsis (default: random) \item[{\em a}]Activation function \item[{\em d}]Derivate for activation function \end{description} +\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} \end{Desc} @@ -110,7 +108,7 @@ Constructor. \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}} -\subsubsection[setWeight]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setWeight (double {\em w})}\label{classneuralpp_1_1Synapsis_acee77d0fdf9889464ab5ed27beae0ff} +\subsubsection[setWeight]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setWeight (double {\em w}) throw (InvalidSynapticalWeightException)}\label{classneuralpp_1_1Synapsis_acee77d0fdf9889464ab5ed27beae0ff} Set the weight of the synapsis. @@ -122,7 +120,7 @@ Set the weight of the synapsis. \end{Desc} \index{neuralpp::Synapsis@{neuralpp::Synapsis}!setDelta@{setDelta}} \index{setDelta@{setDelta}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[setDelta]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setDelta (double {\em d})}\label{classneuralpp_1_1Synapsis_429ad5b25930faf436a9d725582802e1} +\subsubsection[setDelta]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Synapsis::setDelta (double {\em d}) throw (InvalidSynapticalWeightException)}\label{classneuralpp_1_1Synapsis_429ad5b25930faf436a9d725582802e1} It sets the delta (how much to change the weight after an update) of the synapsis. @@ -206,11 +204,6 @@ This value is inversely proportional to the number of steps done in the learning \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} -\index{neuralpp::Synapsis@{neuralpp::Synapsis}!deriv@{deriv}} -\index{deriv@{deriv}!neuralpp::Synapsis@{neuralpp::Synapsis}} -\subsubsection[deriv]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Synapsis::deriv})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Synapsis_2940b370c283aa1b63890666942c26bf} - - The documentation for this class was generated from the following file:\begin{CompactItemize} diff --git a/doc/latex/doxygen.sty b/doc/latex/doxygen.sty index e0f4c8e..cdfa104 100644 --- a/doc/latex/doxygen.sty +++ b/doc/latex/doxygen.sty @@ -10,8 +10,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sun Aug 9 11:11:17 2009 for Neural++ by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sun Aug 9 11:11:17 2009 for Neural++ by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sat Aug 15 02:56:02 2009 for Neural++ by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sat Aug 15 02:56:02 2009 for Neural++ by Doxygen }} \cfoot{} \newenvironment{Code} {\footnotesize} diff --git a/doc/latex/namespaceneuralpp.tex b/doc/latex/namespaceneuralpp.tex index c0a7b51..70bc48b 100644 --- a/doc/latex/namespaceneuralpp.tex +++ b/doc/latex/namespaceneuralpp.tex @@ -20,7 +20,19 @@ struct {\bf neuronrecord} \item struct {\bf synrecord} \end{CompactItemize} +\subsection*{Functions} +\begin{CompactItemize} +\item +double {\bf df} (double($\ast$f)(double), double x) +\end{CompactItemize} \subsection{Detailed Description} -Main namespace for the library. \ No newline at end of file +Main namespace for the library. + +\subsection{Function Documentation} +\index{neuralpp@{neuralpp}!df@{df}} +\index{df@{df}!neuralpp@{neuralpp}} +\subsubsection[df]{\setlength{\rightskip}{0pt plus 5cm}double neuralpp::df (double($\ast$)(double) {\em f}, \/ double {\em x})}\label{namespaceneuralpp_43c8197cc83f65fa9676386579671aec} + + diff --git a/doc/latex/neural_09_09_8hpp.tex b/doc/latex/neural_09_09_8hpp.tex index 16170c3..a03cccc 100644 --- a/doc/latex/neural_09_09_8hpp.tex +++ b/doc/latex/neural_09_09_8hpp.tex @@ -3,8 +3,6 @@ {\tt \#include $<$vector$>$}\par {\tt \#include $<$string$>$}\par {\tt \#include $<$cmath$>$}\par -{\tt \#include $<$ctime$>$}\par -{\tt \#include $<$cstdio$>$}\par {\tt \#include \char`\"{}neural++\_\-exception.hpp\char`\"{}}\par \subsection*{Namespaces} \begin{CompactItemize} @@ -31,23 +29,28 @@ struct {\bf neuralpp::synrecord} \subsection*{Defines} \begin{CompactItemize} \item -\#define {\bf RAND}~( abs( sin(rand()) ) ) +\#define {\bf RAND}~(double) ( (rand() / (RAND\_\-MAX/2)) - 1) \begin{CompactList}\small\item\em Default rand value: $|$sin(rand)$|$, always $>$= 0 and $<$= 1. \item\end{CompactList}\item -\#define {\bf BETA0}~0.7 +\#define {\bf BETA0}~0.8 \begin{CompactList}\small\item\em Initial value for the inertial momentum of the synapses. \item\end{CompactList}\end{CompactItemize} +\subsection*{Functions} +\begin{CompactItemize} +\item +double {\bf neuralpp::df} (double($\ast$f)(double), double x) +\end{CompactItemize} \subsection{Define Documentation} \index{neural++.hpp@{neural++.hpp}!BETA0@{BETA0}} \index{BETA0@{BETA0}!neural++.hpp@{neural++.hpp}} -\subsubsection[BETA0]{\setlength{\rightskip}{0pt plus 5cm}\#define BETA0~0.7}\label{neural_09_09_8hpp_05e2bb5b9fc32f0b6b4d84fe43177d72} +\subsubsection[BETA0]{\setlength{\rightskip}{0pt plus 5cm}\#define BETA0~0.8}\label{neural_09_09_8hpp_05e2bb5b9fc32f0b6b4d84fe43177d72} Initial value for the inertial momentum of the synapses. \index{neural++.hpp@{neural++.hpp}!RAND@{RAND}} \index{RAND@{RAND}!neural++.hpp@{neural++.hpp}} -\subsubsection[RAND]{\setlength{\rightskip}{0pt plus 5cm}\#define RAND~( abs( sin(rand()) ) )}\label{neural_09_09_8hpp_839a9222721835f53c5b248241f535f4} +\subsubsection[RAND]{\setlength{\rightskip}{0pt plus 5cm}\#define RAND~(double) ( (rand() / (RAND\_\-MAX/2)) - 1)}\label{neural_09_09_8hpp_839a9222721835f53c5b248241f535f4} Default rand value: $|$sin(rand)$|$, always $>$= 0 and $<$= 1. diff --git a/doc/latex/refman.tex b/doc/latex/refman.tex index 3c1d6c0..638b894 100644 --- a/doc/latex/refman.tex +++ b/doc/latex/refman.tex @@ -20,7 +20,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.5.6}\\ \vspace*{0.5cm} -{\small Sun Aug 9 11:11:17 2009}\\ +{\small Sat Aug 15 02:56:02 2009}\\ \end{center} \end{titlepage} \clearemptydoublepage diff --git a/examples/adder.xml b/examples/adder.xml index 28fad95..32f31c4 100644 --- a/examples/adder.xml +++ b/examples/adder.xml @@ -16,28 +16,16 @@ 5 - + 3 - 5 - 8 + 4 + 7 - - 4 - 5 - 9 - - - - 40 - 50 - 90 - - - - 33 - 44 - 77 + + 10 + 10 + 20 diff --git a/examples/adderFromScratch.cpp b/examples/adderFromScratch.cpp index b69222b..c49e9b6 100644 --- a/examples/adderFromScratch.cpp +++ b/examples/adderFromScratch.cpp @@ -21,7 +21,6 @@ int main() { xml += NeuralNet::XMLFromSet(1, "3,3,1;7"); xml += NeuralNet::XMLFromSet(2, "5,4,2;11"); NeuralNet::closeXML(xml); - cout << "xml:\n" << xml << endl; net.train(xml, NeuralNet::str); vector v; diff --git a/examples/learnAdd.cpp b/examples/learnAdd.cpp index ee81ae3..0b9ad78 100644 --- a/examples/learnAdd.cpp +++ b/examples/learnAdd.cpp @@ -11,9 +11,9 @@ using namespace neuralpp; int main() { - NeuralNet net(2, 2, 1, 0.005, 1000); + NeuralNet net(2, 2, 1, 0.0005, 10000); - cout << "Training in progress - This may take a while...if it gets stuck, interrupt and restart the app\n"; + cout << "Training in progress - This may take a while...\n"; net.train("adder.xml", NeuralNet::file); net.save("adder.net"); diff --git a/include/neural++.hpp b/include/neural++.hpp index 8da7070..f1e0079 100644 --- a/include/neural++.hpp +++ b/include/neural++.hpp @@ -41,6 +41,8 @@ namespace neuralpp { class Layer; class NeuralNet; + double df (double (*f)(double), double x); + /** * @class NeuralNet * @brief Main project's class. Use *ONLY* this class, unless you know what you're doing @@ -77,12 +79,6 @@ namespace neuralpp { */ double (*actv_f)(double); - /** - * @brief Private pointer to function, containing the function to - * be used as derivate of the activation function - */ - double (*deriv)(double); - public: Layer* input; Layer* hidden; @@ -124,14 +120,13 @@ namespace neuralpp { * @param hidden_size Size of the hidden layer * @param out_size Size of the output layer * @param actv Activation function to use (default: f(x)=x) - * @param deriv Derivate for the activation function to use (default: f'(x)=1) * @param l learn rate (get it after doing some experiments, but generally try to * keep its value quite low to be more accurate) * @param e Epochs (cycles) to execute (the most you execute, the most the network * can be accurate for its purpose) */ NeuralNet (size_t in_size, size_t hidden_size, size_t out_size, - double(*actv)(double), double(*deriv)(double), double l, int e); + double(*actv)(double), double l, int e); /** * @brief It gets the output of the network (note: the layer output should contain @@ -199,7 +194,7 @@ namespace neuralpp { * @param src Source type from which the XML will be loaded (from a file [default] or from a string) * @throw InvalidXMLException */ - void train(string xml, source xrc) throw(InvalidXMLException); + void train (string xml, source src) throw(InvalidXMLException); /** * @brief Initialize the training XML for the neural network @@ -250,7 +245,6 @@ namespace neuralpp { Neuron *out; double (*actv_f)(double); - double (*deriv)(double); public: /** @@ -267,9 +261,8 @@ namespace neuralpp { * @param i Input neuron * @param o Output neuron * @param a Activation function - * @param d Derivate for activation function */ - Synapsis (Neuron* i, Neuron* o, double(*a)(double), double(*d)(double)); + Synapsis (Neuron* i, Neuron* o, double(*a)(double)); /** * @brief Constructor @@ -277,10 +270,9 @@ namespace neuralpp { * @param o Output neuron * @param w Weight for the synapsis (default: random) * @param a Activation function - * @param d Derivate for activation function */ Synapsis (Neuron* i, Neuron* o, - double w, double(*a)(double), double(*d)(double)); + double w, double(*a)(double)); /** * @return Reference to input neuron of the synapsis @@ -349,24 +341,22 @@ namespace neuralpp { vector< Synapsis > out; double (*actv_f)(double); - double (*deriv)(double); + public: /** * @brief Constructor * @param a Activation function - * @param d Its derivate */ - Neuron (double (*a)(double), double(*d)(double)); + Neuron (double (*a)(double)); /** * @brief Alternative constructor, that gets also the synapsis linked to the neuron * @param in Input synapses * @param out Output synapses * @param a Activation function - * @param d Derivate of the activation function */ Neuron (vector in, vector out, - double (*a)(double), double(*d)(double)); + double (*a)(double)); /** * @brief Get the i-th synapsis connected on the input of the neuron @@ -451,25 +441,22 @@ namespace neuralpp { void (*update_weights)(); double (*actv_f)(double); - double (*deriv)(double); public: /** * @brief Constructor * @param sz Size of the layer * @param a Activation function - * @param d Its derivate */ - Layer (size_t sz, double (*a)(double), double(*d)(double)); + Layer (size_t sz, double (*a)(double)); /** * @brief Alternative constructor. It directly gets a vector of neurons to build * the layer * @param neurons Vector of neurons to be included in the layer * @param a Activation function - * @param d Its derivate */ - Layer (vector& neurons, double(*a)(double), double(*d)(double)); + Layer (vector& neurons, double(*a)(double)); /** * @brief Redefinition for operator []. It gets the neuron at i diff --git a/src/layer.cpp b/src/layer.cpp index 1f50579..8498185 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -15,21 +15,18 @@ #include "neural++.hpp" namespace neuralpp { - Layer::Layer(size_t sz, double (*a) (double), double (*d) (double)) { + Layer::Layer(size_t sz, double (*a) (double)) { for (size_t i = 0; i < sz; i++) { - Neuron n(a, d); + Neuron n(a); elements.push_back(n); } actv_f = a; - deriv = d; } - Layer::Layer(vector < Neuron > &el, double (*a) (double), - double (*d) (double)) { + Layer::Layer(vector < Neuron > &el, double (*a) (double)) { elements = el; actv_f = a; - deriv = d; } size_t Layer::size() const { @@ -51,7 +48,7 @@ namespace neuralpp { for (size_t j = 0; j < size(); j++) { Neuron *n2 = &(elements[j]); - Synapsis s(n1, n2, RAND, actv_f, deriv); + Synapsis s(n1, n2, RAND, actv_f); n1->push_out(s); n2->push_in(s); diff --git a/src/neuralnet.cpp b/src/neuralnet.cpp index 06cbaa7..fcef047 100644 --- a/src/neuralnet.cpp +++ b/src/neuralnet.cpp @@ -21,9 +21,10 @@ namespace neuralpp { double __actv(double prop) { return prop; } - - double __deriv(double prop) { - return 1; + + double df (double (*f)(double), double x) { + double h = 0.000001; + return (f(x+h) - f(x)) / h; } NeuralNet::NeuralNet(size_t in_size, size_t hidden_size, @@ -33,28 +34,26 @@ namespace neuralpp { ref_epochs = epochs; l_rate = l; actv_f = __actv; - deriv = __deriv; - input = new Layer(in_size, __actv, __deriv); - hidden = new Layer(hidden_size, __actv, __deriv); - output = new Layer(out_size, __actv, __deriv); + input = new Layer(in_size, __actv); + hidden = new Layer(hidden_size, __actv); + output = new Layer(out_size, __actv); link(); } NeuralNet::NeuralNet(size_t in_size, size_t hidden_size, size_t out_size, double (*a) (double), - double (*d) (double), double l, int e) { + double l, int e) { epochs = e; ref_epochs = epochs; l_rate = l; actv_f = a; - deriv = d; - input = new Layer(in_size, a, d); - hidden = new Layer(hidden_size, a, d); - output = new Layer(out_size, a, d); + input = new Layer(in_size, a); + hidden = new Layer(hidden_size, a); + output = new Layer(out_size, a); link(); } @@ -71,8 +70,7 @@ namespace neuralpp { } double NeuralNet::error(double expected) const { - return abs((getOutput() - expected * - deriv(getOutput())) / (abs(expected))); + return 0.5*(getOutput()-expected)*(getOutput()-expected); } void NeuralNet::propagate() { @@ -103,22 +101,24 @@ namespace neuralpp { for (size_t i = 0; i < output->size(); i++) { Neuron *n = &(*output)[i]; + double prop = 0.0; + + for (size_t j = 0; j < n->nIn(); j++) + prop += (n->synIn(j).getWeight() * n->synIn(j).getIn()->getActv()); for (size_t j = 0; j < n->nIn(); j++) { Synapsis *s = &(n->synIn(j)); if (ref_epochs - epochs > 0) out_delta = - s->getIn()->getActv() * - error(ex) * (-l_rate) + - s->momentum(ref_epochs, - ref_epochs - - epochs) * + (-l_rate) * (getOutput() - expected()) * + df(actv_f, prop) * s->getIn()->getActv() + + s->momentum(ref_epochs, ref_epochs - epochs) * s->getPrevDelta(); else out_delta = - s->getIn()->getActv() * - error(ex) * (-l_rate); + (-l_rate) * (getOutput() - expected()) * + df(actv_f, prop) * s->getIn()->getActv(); s->setDelta(out_delta); } @@ -127,7 +127,7 @@ namespace neuralpp { for (size_t i = 0; i < hidden->size(); i++) { Neuron *n = &(*hidden)[i]; double d = - deriv(n->getProp()) * + df(actv_f, n->getProp()) * n->synOut(0).getWeight() * out_delta; for (size_t j = 0; j < n->nIn(); j++) { @@ -434,7 +434,7 @@ namespace neuralpp { if (xml.FindElem("NETWORK")) { while (xml.FindChildElem("TRAINING")) { - vector < double >input; + vector input; double output; bool valid = false; @@ -442,10 +442,9 @@ namespace neuralpp { while (xml.FindChildElem("INPUT")) { xml.IntoElem(); - input. - push_back(atof - (xml.GetData(). - c_str())); + input.push_back(atof( + xml.GetData().c_str())); + xml.OutOfElem(); } diff --git a/src/neuron.cpp b/src/neuron.cpp index 563f7b0..fa90085 100644 --- a/src/neuron.cpp +++ b/src/neuron.cpp @@ -14,19 +14,17 @@ #include "neural++.hpp" namespace neuralpp { - Neuron::Neuron(double (*a) (double), double (*d) (double)) { + Neuron::Neuron(double (*a) (double)) { actv_f = a; - deriv = d; } Neuron::Neuron(vector < Synapsis > i, vector < Synapsis > o, - double (*a) (double), double (*d) (double)) { + double (*a) (double)) { in = i; out = o; actv_f = a; - deriv = d; } Synapsis & Neuron::synIn(size_t i) { diff --git a/src/synapsis.cpp b/src/synapsis.cpp index 8519aa4..77b843e 100644 --- a/src/synapsis.cpp +++ b/src/synapsis.cpp @@ -23,9 +23,7 @@ namespace neuralpp { prev_delta = 0; } - Synapsis::Synapsis(Neuron * i, Neuron * o, double (*a) (double), - double (*d) (double)) { - + Synapsis::Synapsis(Neuron * i, Neuron * o, double (*a) (double)) { srand((unsigned) time(NULL)); delta = 0; @@ -35,12 +33,10 @@ namespace neuralpp { out = o; actv_f = a; - deriv = d; } Synapsis::Synapsis(Neuron * i, Neuron * o, - double w, double (*a) (double), - double (*d) (double)) { + double w, double (*a) (double)) { delta = 0; prev_delta = 0; @@ -49,7 +45,6 @@ namespace neuralpp { out = o; actv_f = a; - deriv = d; } Neuron *Synapsis::getIn() {