贝辛霍普大都会的气温是多少?

2024-06-16 10:32:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在设置使用SciPy的basin-hopping全局优化器。它的参数T状态文档

T: float, optional

The “temperature” parameter for the accept or reject criterion. Higher “temperatures” mean that larger jumps in function value will be accepted. For best results T should be comparable to the separation (in function value) between local minima.

当它说“函数值”时,这是否意味着成本函数的预期返回值func?还是传递给它的值?还是别的什么

我阅读了源代码,看到了T传递给Metropolis验收标准的位置,但我不理解转换为“beta”时如何使用它


Tags: the函数in文档参数value状态function
1条回答
网友
1楼 · 发布于 2024-06-16 10:32:34

我不熟悉该算法,但如果您继续阅读您发布的链接上的文档,您会发现:

Choosing T: The parameter T is the “temperature” used in the Metropolis criterion. Basinhopping steps are always accepted if func(xnew) < func(xold). Otherwise, they are accepted with probability:exp( -(func(xnew) - func(xold)) / T ). So, for best results, T should to be comparable to the typical difference (in function values) between local minima. (The height of “walls” between local minima is irrelevant.)

所以我认为T应该接受你试图优化的函数的值,func。这是有意义的,如果你看概率表达式,你会比较函数值的差异和步骤的“上限”类型。例如,如果一个局部极小值是^ {< CD2> },而另一个是^ {CD3}},则可以认为^ {CD4}}是适当的值。p>

相关问题 更多 >