New answers tagged

0

Yes, you are optimizing a knapsack problem. The objects, or "items" in most knapsack problem (KP) definitions, in your case is a set $S=\{s_{00}, s_{01}, ..,s_{0n}, s_{10}, .. s_{kn}\}$, which contains composite keyword-bid pairs, so $s_{ij}$ denotes an object labeled "keyword $i$ bid $j$". The reason you should think of your items as composite this way ...


6

You can parameterize your rank-1 matrix $A$ as $A=xs^{T}$ where $x$ and $s$ are the unknown $n$ by $1$ column vectors. You then have an unconstrained problem $\min f(x,s)$. Depending on the function $f$, it may or may not be easy to express $f$ as $f(x,s)$ rather than as $f(A)$, and $f(x,s)$ might or might not be (probably not in practice) a convex ...


2

You should use a modeling language so that your code is independent of the underlying solver. cvxpy is a good choice. When I rewrite your model in cvxpy: #!/usr/bin/env python3 import cvxpy as cp import numpy as np from numpy.random import normal as randn Sample = 10 H = randn(size=(4,2,Sample))+1j*randn(size=(4,2,Sample)) h = randn(size=(4,1))+1j*randn(...


Top 50 recent answers are included