美文网首页
NLopt的Gradient-based versus deri

NLopt的Gradient-based versus deri

作者: 布织岛 | 来源:发表于2019-03-12 03:37 被阅读0次

    使用Gradient-based算法需要在代码中写出所求的各个变量的一阶导函数。

    1 什么时候用Gradient-based算法?有什么好处呢?

    Especially for local optimization, the most efficient algorithms typically require the user to supply the gradient ∇fin addition to the valuef(x) for any given pointx(and similarly for any nonlinear constraints).

    Gradient-based算法的计算会很快。

    2 什么时候适合用derivative-free algorithm?

    On the other hand, computing the gradient is sometimes cumbersome and inconvenient if the objective function is supplied as a complicated program. It may even be impossible, iffis not differentiable (or worse, is discontinuous). In such cases, it is often easier to use a derivative-free algorithm for optimization, which only requires that the user supply the functionvaluesf(x) for any given pointx.

    相关文章

      网友评论

          本文标题:NLopt的Gradient-based versus deri

          本文链接:https://www.haomeiwen.com/subject/skuwpqtx.html