0

I'm relatively new to scipy and I'm looking for a guidance. I have an unconstrained minimization problem of the form:

function

Where a and b are coefficients and x is a vector of unknowns (can be of different length). I'm wondering about how to solve this problem using python. I looked through the scipy reference guide but couldn't find the answer.

Thank you

Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
  • 1
    Start by checking out the [tutorial](http://scipy.github.io/devdocs/tutorial/optimize.html) and not the API-reference. It's very easy (to implement *something*; it might not be the best) and those examples should be enough to get you going. – sascha Apr 10 '17 at 12:22
  • 1
    Could you show your attempts and where you got stuck? – Cleb Apr 10 '17 at 12:54

1 Answers1

-2

Let A be the sum of the a's and X that of the x's. Then you want to choose X to minimise

Sum{ i | square( A-X-b[i])}

The value of X that minimises this will be the mean (over i) of A-b[i], that is A - mean(b)

dmuir
  • 4,211
  • 2
  • 14
  • 12
  • 1
    This does not answer the question of how to apply Python to the problem. Just because the question is bad does not mean that your answer can be as well. – Mad Physicist Apr 12 '17 at 16:53