Skip to Main Content
Practical Neural Network Recipies in C++
book

Practical Neural Network Recipies in C++

by Masters
June 2014
Intermediate to advanced content levelIntermediate to advanced
493 pages
20h 30m
English
Morgan Kaufmann
Content preview from Practical Neural Network Recipies in C++
144 Chapter 8
if (ftemp>
1.e-20){
tmult = avgfitness / ftemp ;
tconst = -minfitness * avgfitness / ftemp ;
}
else {
tmult = 1.0 ;
tconst = 0.0 ;
}
}
The scaling factors have been computed. Do the scaling now. The
truncation at zero is theoretically unnecessary, as we avoided negatives
when we computed the scaling factor above. However, floating point
problems can sometimes still produce a 'negative zero'. In deference to
possible user modifications which DEMAND nonnegative fitnesses, it is
good programming practice to enforce this.
avgfitness = 0.0 ;
for (individualo ; individual<popsize ; individual·^) {
fit = tmult * fitnesspndividual] + ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Neural Networks with Keras Cookbook

Neural Networks with Keras Cookbook

V Kishore Ayyadevara
Scientific Computing with Python 3

Scientific Computing with Python 3

Claus Führer, Claus Fuhrer, Jan Erik Solem, Olivier Verdier
Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella

Publisher Resources

ISBN: 9780080514338