[mlpack-git] [mlpack/mlpack] CNE algorithm (#753)
Marcus Edel
notifications at github.com
Mon Aug 29 17:48:43 EDT 2016
> + int generation = 0;
> + InitSpecies();
> +
> + // Repeat
> + while (generation < maxGeneration)
> + {
> + // Evaluate all genomes in the species.
> + for (int i = 0; i < species.SpeciesSize(); ++i)
> + {
> + double fitness = task.EvalFitness(species.genomes[i]);
> + species.genomes[i].Fitness(fitness);
> + }
> + species.SetBestFitnessAndGenome();
> +
> + // Output some information.
> + printf("Generation: %zu\tBest fitness: %f\n", generation, species.BestFitness());
Can you use ``Log::Info << "message" << std::endl;`` instead of ``printf``? That way a user can disable the output if needed or adjust the output according to his own preference e.g. only debug outputs (``Log::Debug``).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/753/files/44f44cd14f046539b92395ada8ca4bf184ea4f93#r76694261
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160829/6737a4e6/attachment.html>
More information about the mlpack-git
mailing list