获取scipy.optimize.minimize忽略某些结果

发布于 2025-01-24 05:33:56 字数 233 浏览 2 评论 0原文

我试图为耦合部分微分方程模型找到最佳的参数集,即目标函数不是分析性的。基本速率方程是分析性的,必须集成,因此结果取决于发送到方程组的历史记录。最多有16个参数。它们是有限的,但是有一些相互依存的依赖性(否则,我会做出一些约束)。我尽我所能提出恒定的界限,但是在某些情况下,优化器会选择导致零或无穷大值的参数。

我已经尝试过“尝试:/ext:”无济于事。有谁知道我可以得到scipy.optmize.minimize拒绝/忽略运行的方式吗?

I am trying to find the best set of parameters for a model of coupled partial differential equations, i.e. the objective function is not analytical. The underlying rate equations are analytical and must be integrated so the results depend on the history sent to the set of equations. There are up to 16 parameters. They are bounded but there are interdependencies that are unknown (otherwise, I would make some constraints). I have done my best to come up with constant bounds but there are instances where the optimizer chooses parameters that result in division by zero or infinity values.

I have already tried "try:/except:" to no avail. Does anyone know of a way I can get scipy.optmize.minimize to reject/ignore a run if these numerical issues show up?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文