Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
171 views
in Technique[技术] by (71.8m points)

python - Is this a unconstrained multivariable optimization problem, and best way to solve?

I have a dataset that looks like this:

x1 x2 ... xn y1 y2 ... yn z1 z2 ... zn
50 40 3 80 -0.9 0.1 0.9 -0.3 0 0.5 0.9 0.8
20 10 8 20 -0.1 -0.5 0.8 -0.2 0.1 0.4 0.3 0.1
question from:https://stackoverflow.com/questions/66065417/is-this-a-unconstrained-multivariable-optimization-problem-and-best-way-to-solv

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Not really a complete answer, but this is how I would start looking at a model for solving this.

I would start with introducing decision variables:

s(i) = 1 if row i is selected
       0 otherwise

w(i) ≥ 0 weight of row i  (not sure about the role of the weights)

The objective can look like:

min/max sum( (i,j)|j∈C, s(i)*w(i)*a(i,j) )

Here we could sum over a subset of all columns. a(i,j) is our data matrix.

The constraints can look like:

s(i)*20 ≤ s(i)*a(i,'x2') ≤ s(i)*40 
s(i)*(-.1) ≤ s(i)*a(i,'y') ≤ s(i)*.4 

This can be solved with a Mixed-Integer Programming Solver (as long as we keep things linear). The objective looks quadratic right now (s(i)*w(i)) but that can be linearized or we can use a non-convex MIQP solver.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...