简体   繁体   English

寻找凹函数可接受极限的优化算法

[英]Optimization algorithm to find acceptable limits of a concave function

I have a black box function f(x) with the following criteria:我有一个具有以下条件的黑盒函数f(x)

Within Python, I would like to get an algorithm that delivers to me - with the least amount of steps - the positions x0 , x1 where f is greater or equal to a .在 Python 中,我想获得一种算法,该算法以最少的步数提供给我的位置x0x1 ,其中f大于或等于a

It can be assumed that there exist values for x where f(x) is greater/equal than a .可以假设存在x值,其中f(x)大于/等于a

See this picture for visualizing the problem:请参阅此图片以可视化问题:

在此处输入图片说明

So my questions are:所以我的问题是:

  • What would be the name for such an algorithm, if there is one (like there is eg the bubble sort algorithm when the task is to sort a list)?如果有这样的算法,那么该算法的名称是什么(例如,当任务是对列表进行排序时,有bubble sort algorithm )?
  • How would an algorithm for my problem look like?我的问题的算法是什么样的?
  • Alternatively: Is there a standard Python library for such task?或者:是否有用于此类任务的标准 Python 库?

Looking for points where a function crosses the x-axis is zero-finding or x-axis intercept finding.寻找函数与 x 轴交叉的点是zero-finding或 x 轴截距查找。 You can define a new function g(x) = f(x) - a then find the 'zeros' of the g(x) function.您可以定义一个新函数 g(x) = f(x) - a 然后找到 g(x) 函数的“零点”。

The simplest way of finding intercepts is to find an xa and xb where g(xa) < 0 and g(xb) > 0. Then choose an xc midway between those and continue using xc and one of xa or xb (that has the opposite sign as xc).找到截距的最简单方法是找到 xa 和 xb,其中 g(xa) < 0 和 g(xb) > 0。然后在它们之间选择一个 xc 并继续使用 xc 和 xa 或 xb 之一(具有相反的签名为 xc)。 Repeat these steps again until the interval between x's is small enough to be considered 'found'.再次重复这些步骤,直到 x 之间的间隔小到足以被视为“找到”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM