V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
hxyCoding
V2EX  ›  Python

scipy 非线性优化中 bounds 参数定义问题

  •  
  •   hxyCoding · 2022-07-01 18:13:53 +08:00 · 1397 次点击
    这是一个创建于 636 天前的主题,其中的信息可能已经有所发展或是发生改变。

    scipy 非线性优化中 bounds 参数定义问题

    例:optimize.linprog(c, A_ub=Aub, b_ub=bup, bounds=bounds)

    bounds 参数 只能设置( min,max )吗?能否给定有限集合[0,10,20,30 ...]?

    1 条回复    2022-07-04 00:34:08 +08:00
    necomancer
        1
    necomancer  
       2022-07-04 00:34:08 +08:00
    这个……我觉得你可能需要考虑一下这个
    scipy.optimize.brute

    或者考虑重新规划你的问题,如果你只有某些变量是离散的,那就把离散的变量当作参数然后对所有可能进行遍历,也就是给定每一个可能的值,然后对其他变量进行优化,最后对比哪个参数下函数值最小。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1296 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:31 · PVG 07:31 · LAX 16:31 · JFK 19:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.