2

My problem is defined as below,

minΣ(||xi-Xci||^2+ λ||ci||),

s.t cii = 0,

where X is a matrix of shape d * n and C is of the shape n * n, xi and ci means a column of X and C separately.

X is known here and based on X we want to find C.

I got several options now, I already have the version in tensorflow, which uses the AdamOptimizer. I am just wondering, is there any way that I can solve this problem more efficiently? Would cvxpy or cvxopt solve this problem better?

I would be much appreciated if any of you could give me an implementation on either of these methods other than tensorflow.

xxx222
  • 2,980
  • 5
  • 34
  • 53
  • 1
    would be great to use Latex to rewrite your equations to make them more readable, so more people will look into your problem. – Wei Liu Jul 18 '16 at 21:14

1 Answers1

1

The objective function, I guess, is related to dictionary learning (e.g. your X) and sparse coding (your ci) for which there are several good libraries in Python.

Take a look at scikit-learn's sparse coding and dictionary learning. Alternatively you can use SPAMS for optimisation.

You already know your dictionary so what you need to know is the sparse codes. I think using scikit-learns sparse coders would be the easiest way to go.

If you want to have more power over the optimisation process, you can implement it in Theano (or Keras, Lasagne, TensorFlow) yourself as in this.

Ash
  • 3,428
  • 1
  • 34
  • 44
  • 1
    Good analysis! There is also wikis article on [Sparse approximation](https://en.wikipedia.org/wiki/Sparse_approximation) mentioning possible algorithms, some of them already implemented in scikit-learn. The lasso-approach should be a good starting-point if the OP want's to use general-purpose convex optimization methods within cvxpy. – sascha Jul 19 '16 at 12:11