Initial population generation in CNE
philipp-andelfinger opened this issue · comments
philipp-andelfinger commented
CNE seems to generate the initial population by adding uniform noise to the initial guess, instead of Gaussian noise as stated in the comment.
https://github.com/mlpack/ensmallen/blob/master/include/ensmallen_bits/cne/cne_impl.hpp#L91
// Generate the population based on a Gaussian distribution around the given
// starting point.
std::vector<BaseMatType> population;
for (size_t i = 0 ; i < populationSize; ++i)
{
population.push_back(arma::randu<BaseMatType>(iterate.n_rows, iterate.n_cols) + iterate);
}
Possibly, the intended loop body is something like:
population.push_back(mutationSize * arma::randn<BaseMatType>(iterate.n_rows, iterate.n_cols) + iterate);
Marcus Edel commented
Nice catch, I'll open a PR to fix this unless you already have a patch ready.
mlpack-bot commented
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍
Ryan Curtin commented
I opened #258 with a quick fix. 👍