如何有效解决复合成本函数优化问题? [英] How to effectively solve a compound cost function optimisation problem?

查看:143
本文介绍了如何有效解决复合成本函数优化问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Python解决以下优化问题:

I want to solve the following optimization problem with Python:

我有一个黑箱函数f,其中有多个变量作为输入. 黑匣子功能的执行非常耗时,因此我想避免使用暴力手段.

I have a black box function f with multiple variables as input. The execution of the black box function is quite time consuming, therefore I would like to avoid a brute force approach.

我想找到该黑盒功能f的最佳输入参数.

I would like to find the optimum input parameters for that black box function f.

在下文中,为简单起见,我只写了一个维度x的依赖项.

In the following, for simplicity I just write the dependency for one dimension x.

最佳参数x定义为: 成本函数cost(x)的总和为

An optimum parameter x is defined as: the cost function cost(x) is maximized with the sum of

  • f(x)
  • 最大标准偏差f(x)
  • f(x) value
  • a maximum standard deviation of f(x)

.

cost(x) = A * f(x) + B * max(standardDeviation(f(x)))

参数AB是固定的.

例如,对于下面的图片,位置"U"处的x值将优先于"V"位置的x值.

E.g., for the picture below, the value of x at the position 'U' would be preferred over the value of x at the positon of 'V'.

我的问题是:

我可以利用任何易于适应的框架或流程吗(类似于模拟退火或贝叶斯优化)?

如上所述,我想避免使用暴力手段.

As mentioned, I would like to avoid a brute force approach.

推荐答案

我仍然不能100%确定您的方法,但是这个公式对您是否正确:

I’m still not 100% sure of your approach, but does this formula ring true to you:

A * max(f(x))+ B * max(standardDeviation(f(x)))

A * max(f(x)) + B * max(standardDeviation(f(x)))

?

如果确实如此,那么我想您可能要考虑使f(x)最大化可能与(或可能不)与使f(x)的标准偏差最大化兼容,这意味着您可能正面临多目标优化问题.

If it does, then I guess you may want to consider that maximizing f(x) may (or may not) be compatible with maximizing the standard deviation of f(x), which means you may be facing a multi-objective optimization problem.

同样,您尚未指定f(x)返回的内容-它是向量吗?希望如此,否则我不清楚您可以根据什么计算标准差.

Again, you haven’t specified what f(x) returns - is it a vector? I hope it is, otherwise I’m unclear on what you can calculate the standard deviation on.

您发布的图片对我而言并不那么明显. F(x)是整个黑色曲线,它在v点处具有最大值,但是对于标准偏差您能说什么呢?要计算标准偏差,必须考虑 entire f(x)曲线(包括点u),而不仅仅是u和v的邻域.在f(x)的最大值附近的时间间隔内出现偏差,那么我认为在框架方面运气不佳.我想到的最好的事情是使用局部(或可能是全局的,更好的)优化算法来寻找f(x)的最大值-模拟退火,差分进化,隧穿等等-然后,当您找到了f(x)的最大值,在最优值的左右两侧采样一些点,并计算这些评估的标准偏差.然后,您必须确定f(x)的最大值和此标准偏差的组合与之前找到的任何最佳"点相比是否足够好.

The picture you posted is not so obvious to me. F(x) is the entire black curve, it has a maximum at the point v, but what can you say about the standard deviation? To calculate the standard deviation of you have to take into account the entire f(x) curve (including the point u), not just the neighborhood of u and v. If you only want to get the standard deviation in an interval around a maximum for f(x), then I think you’re out of luck when it comes to frameworks. The best thing that comes to my mind is to use a local (or maybe global, better) optimization algorithm to hunt for the maximum of f(x) - simulated annealing, differential evolution, tunnelling, and so on - and then, when you have found a maximum for f(x), sample a few points on the left and right of your optimum and calculate the standard deviation of these evaluations. Then you’ll have to decide if the combination of the maximum of f(x) and this standard deviation is good enough or not compared to any previous "optimal" point found.

所有这些都是推测,因为我不确定您的问题确实是一种优化,或者仅仅是一个高峰发现"练习,为此,有许多种不同的方法,而且功能更强大,更充分.

This is all speculation, as I’m unsure that your problem is really an optimization one or simply a "peak finding" exercise, for which there are many different - and more powerful and adequate- methods.

安德里亚.

这篇关于如何有效解决复合成本函数优化问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆