解释 scipy 差分进化中顶部参数的直觉
Explain the intuition for the tol paramer in scipy differential evolution
我在 scipy 中使用 differential evolution 优化器,但我不理解 tol 参数背后的直觉。具体是文档里说的:
tol: float, optional
When the mean of the population energies, multiplied by tol, divided
by the standard deviation of the population energies is greater than 1
the solving process terminates:
convergence = mean(pop) * tol / stdev(pop) > 1
从用户的角度来看,设置 tol 代表什么?
也许文档中的公式用下面的形式更容易理解(参见the code中的第508和526行):
std(population_energies) / mean(population_energies) < tol
这意味着当种群中每个个体的能量标准偏差以平均值为范数小于给定的容差值时,就达到了收敛。
优化算法是迭代的。每次迭代都会找到更好的解决方案。容差参数用于定义停止条件。停止条件实际上是所有个体(参数集)具有大致相同的能量,即相同的成本函数值。然后,给出最低能量的参数集作为解决方案返回。
这也意味着所有个体在参数space中都比较接近。因此,不能指望下一代有更好的解决方案。
我在 scipy 中使用 differential evolution 优化器,但我不理解 tol 参数背后的直觉。具体是文档里说的:
tol: float, optional
When the mean of the population energies, multiplied by tol, divided by the standard deviation of the population energies is greater than 1 the solving process terminates:
convergence = mean(pop) * tol / stdev(pop) > 1
从用户的角度来看,设置 tol 代表什么?
也许文档中的公式用下面的形式更容易理解(参见the code中的第508和526行):
std(population_energies) / mean(population_energies) < tol
这意味着当种群中每个个体的能量标准偏差以平均值为范数小于给定的容差值时,就达到了收敛。
优化算法是迭代的。每次迭代都会找到更好的解决方案。容差参数用于定义停止条件。停止条件实际上是所有个体(参数集)具有大致相同的能量,即相同的成本函数值。然后,给出最低能量的参数集作为解决方案返回。
这也意味着所有个体在参数space中都比较接近。因此,不能指望下一代有更好的解决方案。