entropy size change added

This commit is contained in:
2014-11-12 18:19:06 +01:00
parent efbc8a4d1a
commit f81b5a5b5f
4 changed files with 28 additions and 7 deletions

View File

@@ -42,9 +42,7 @@ void Shin::NeuronNetwork::Learning::BackPropagation::propagate(const Shin::Neuro
else
max=network[i-1]->size();
size_t j=1;
int size=network[i]->size();
for(j=1;j<size;j++)
for(size_t j=1;j<network[i]->size();j++)
{
network[i]->operator[](j)->setWeight(0,network[i]->operator[](j)->getWeight(0)+deltas[i][j]*learningCoeficient);
for(size_t k=1;k<max;k++)
@@ -73,7 +71,7 @@ double Shin::NeuronNetwork::Learning::BackPropagation::teach(const Shin::NeuronN
{
for(size_t i=0;i<solution.size();i++)
{
s.push_back(solution[i]*((double)(990+(rand()%21))/1000.0));
s.push_back(solution[i]*((double)((100000-entropySize)+(rand()%(entropySize*2+1)))/100000.0));
}
propagate(s);
}else

View File

@@ -9,8 +9,14 @@
#include "Supervised"
/*
* http://sydney.edu.au/engineering/it/~comp4302/ann4-3s.pdf
* http://www.cs.cmu.edu/afs/cs/academic/class/15883-f13/slides/backprop.pdf
* http://airccse.org/journal/jcsit/0211ijcsit08.pdf
* http://www.cedar.buffalo.edu/~srihari/CSE574/Chap5/Chap5.3-BackProp.pdf
* http://stackoverflow.com/questions/13095938/can-somebody-please-explain-the-backpropagation-algorithm-to-me
* http://ufldl.stanford.edu/wiki/index.php/Backpropagation_Algorithm
*
*
* http://www.cleveralgorithms.com/nature-inspired/neural/backpropagation.html
*
*/
@@ -29,9 +35,11 @@ namespace Learning
void setLearningCoeficient (double);
void allowEntropy() {entropy=1;}
void setEntropySize(int milipercents) { entropySize=milipercents; }
protected:
double learningCoeficient=0.4;
bool entropy=1;
bool entropy=0;
int entropySize=500;
};
}
}

View File

@@ -2,7 +2,7 @@
Shin::NeuronNetwork::Learning::OpticalBackPropagation::OpticalBackPropagation(FeedForwardNetworkQuick &n): BackPropagation(n)
{
setEntropySize(100);
}
void Shin::NeuronNetwork::Learning::OpticalBackPropagation::propagate(const Shin::NeuronNetwork::Solution& expectation)

View File

@@ -11,8 +11,23 @@
#include "functional"
/*
* http://www2.econ.iastate.edu/tesfatsi/RLUsersGuide.ICAC2005.pdf
* http://www.autonlab.org/tutorials/rl06.pdf
* http://www.nbu.bg/cogs/events/2000/Readings/Petrov/rltutorial.pdf
*
* http://www.applied-mathematics.net/qlearning/qlearning.html
* http://nn.cs.utexas.edu/downloads/papers/stanley.gecco02_1.pdf
*
* http://stackoverflow.com/questions/740389/good-implementations-of-reinforced-learning
*
* http://stackoverflow.com/questions/10722064/training-a-neural-network-with-reinforcement-learning
*
* http://remi.coulom.free.fr/Thesis/
* http://remi.coulom.free.fr/Publications/Thesis.pdf
*
* http://link.springer.com/article/10.1007/BF00992696
*
* http://scholar.google.cz/scholar?start=10&q=reinforcement+learning+feedforward&hl=en&as_sdt=0,5&as_vis=1
*
*/