scipy最优化

本文详细介绍Scipy中的优化功能,涵盖一元及多元函数优化、线性规划、约束最小二乘和非线性最小二乘、寻根、曲线拟合等内容,并提供多种优化算法及其适用场景。

scipy最优化

学习scipy进行优化函数:

参考:Optimization and root finding (scipy.optimize) — SciPy v1.9.3 Manual

scipy最优化的功能:

1、SciPy优化提供了最小化(或最大化)目标函数的函数,可以是有约束的;

2、非线性问题的求解器(支持局部和全局优化算法);

3、线性规划;

4、约束最小二乘和非线性最小二乘;

5、寻根;

6、曲线拟合;

标量函数优化

minimize_scalar(fun[, bracket, bounds, …]) Minimization of scalar function of one variable.一元标量函数的最小化。

The minimize_scalar function supports the following methods:

局部多变量优化

minimize(fun, x0[, args, method, jac, hess, …]) Minimization of scalar function of one or more variables.一个或多个变量的标量函数的最小化

The minimize function supports the following methods:

Constraints are passed to minimize function as a single object or as a list of objects from the following classes:

NonlinearConstraint(fun, lb, ub[, jac, …]) Nonlinear constraint on the variables.
LinearConstraint(A[, lb, ub, keep_feasible]) Linear constraint on the variables.

Simple bound constraints are handled separately and there is a special class for them:(有一个特殊的类是单独处理简单约束的)

Bounds[lb, ub, keep_feasible] Bounds constraint on the variables.变量的边界约束。

Quasi-Newton strategies implementing HessianUpdateStrategy interface can be used to approximate the Hessian in minimize function (available only for the ‘trust-constr’ method). Available quasi-Newton methods implementing this interface are:(实现HessianUpdateStrategy接口的拟牛顿策略可以用来近似Hessian的最小化函数(仅适用于“信任-constr”方法)。实现此接口的可用拟牛顿方法包括:)

BFGS([exception_strategy, min_curvature, …]) Broyden-Fletcher-Goldfarb-Shanno (BFGS) Hessian update strategy.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

KPer_Yang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值