Skip to main content
0 votes
1 answer
46 views

Debugging scipy.minimize

I am trying to "minimize" using SLSQP in scipy module. With a lot of difficulty, I am trying to implement some constraints. I am encountering some strange error, thus unable to debug. My ...
Murali's user avatar
  • 21
0 votes
0 answers
77 views

How do I fix the issue in my constrained non-linear 6D pose optimization problem using scipy.optimize?

I am a robotics student and am quite new to the field of computer vision, especially with pose estimation. I am trying to estimate the best 6D (rotation plus translation) grasping pose on the top ...
ShubhamTheJoshi's user avatar
0 votes
1 answer
60 views

How do I interpret scipy.optimize.minimize convergence metrics? Specifically, nit, nfev, njev in the output

I am solving an constrained, nonlinear optimization problem with scipy.optimize.minimize using the SLSQP solver. The optimization converges properly, but I want to have a better understanding of how ...
kehunter's user avatar
1 vote
0 answers
76 views

Fitting with Maximum likelihood estimation in python returns initial parameters

I would like to use minimize from scipy.optimize to fit my data with a specific function: I defined this log likelihood to this aim: def log_likelihood(theta, freq, CPSD, CPSD_err): ''' This ...
Apinorr's user avatar
  • 328
0 votes
0 answers
53 views

sc.minimize ignoring the constraints

I'm having some troubles with this optimization below. x0 is an array with -1 and 1, the result i'm trying to achieve is that the code choose to let the number as +/- 1 or change to 0, the main ...
Pedro Andion's user avatar
1 vote
0 answers
35 views

Interdependent bounds in scipy minimize

Say I have a function f(x,y,z) I want to minimize using scipy.optimize.minimize. I want to minimize it subject to the constraint x < y < z. I don't think I can use the bounds argument to do this ...
Ben's user avatar
  • 377
1 vote
0 answers
50 views

Running SciPy Optimizer Dual Annealing

What is the correct way to call dual_annealing scipy optimizer? Tried both the variants, neither of them works. import scipy.optimize as spo optimizer_fn = 'spo.dual_annealing' optimizer = eval(...
madmatrix's user avatar
  • 265
0 votes
2 answers
53 views

Scipy Minimize with boolean decision matrix

I have a distance matrix between 2 sets of points ( sets A & B ). Each A point is associated with an equal number of B points ( if possible ). I want to minimize the standard deviation of average ...
Fabrice BOUCHAREL's user avatar
0 votes
0 answers
61 views

Preconditioning conjugate gradient solvers in scipy.optimize.minimize

I'm solving a large unconstrained optimization problem and experimenting with the trust-kyrlov / trust-ncg methods in scipy.optimize.minimize. Unfortunately, these methods can be quite slow when my ...
Eric Weine's user avatar
1 vote
1 answer
84 views

Applying scipy.minimize to Pandas dataframe with parameters

I have a function defined by f(x_0, x_1) = a(x_1 - x_0^2)^2 + (b - x_0)^2, where a and b are some parameters: def f(x): return a*(x[1]-x[0]**2)**2+(b-x[0])**2 where x=np.array([x_0,x_1]) is a numpy ...
Ishigami's user avatar
  • 580
0 votes
1 answer
56 views

NonlinearConstraint in SciPy Optimize not working with vector bounds?

I asked ChatGPT and it wasn't helpful. Basically I want to implement a constraint on a Transformed vector of X, let's say T(X). How do I do that? Here is my code: def TransformFunction(X): ...
confused's user avatar
  • 187
0 votes
0 answers
101 views

`scipy.optimize.minimize` gives different results on GCP and Mac

SciPy's minimize() gives different results on different machines: sp.optimize.minimize(cost_function, x_init, bounds=x_bounds, args=args_in, method='SLSQP', options={'maxiter': sim_config['maxiter'], '...
AdityaT101's user avatar
0 votes
1 answer
126 views

SciPy Minimize Constrain Around Internal Parameter, Not Input

EDIT 1: This question has been completely modified for improved clarity and to better state my intent. The original post is at the end. I think a lot of people are confused by my example code. It was ...
kriegersan's user avatar
0 votes
1 answer
76 views

Using Preconditioners in scipy.minimize

Can I use Jacobi Preconditioning for the inner CG step in Truncated Newton Conjugate implementation of scipy? The options for the TNC solver do not include any support for preconditioning. I'm ...
atomr's user avatar
  • 3
0 votes
1 answer
66 views

BFGS algorithm finding almost good parameters but not converging with scipy.minimize()

I am estimating an Interval Regression model. I wrote my likelihood function (see intreg, STATA) as stated bellow, and compared my results with STATA. I am finding almost exactly (within 0.001) same ...
Youssef's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
33