0

I have to set up a phoneme table with a specific probability distribution for encoding things. Now there are 22 base elements (each with an assigned probability, sum 100%), which shall be mapped on a 12 element table, which has desired element probabilities (sum 100%).

So part of the minimisation is to merge several base elements to get 12 table elements. Each base element must occur exactly once.

In addition, the table has 3 rows. So the same 12 element composition of the 22 base elements must minimise the error for 3 target vectors. Let's say the given target vectors are b1,b2,b3 (dimension 12x1), the given base vector is x (dimension 22x1) and they are connected by the unknown matrix A (12x22) by:

b1+err1=Ax

b2+err2=Ax

b3+err3=Ax

To sum it up: A is to be found so that dot_prod(err1+err2+err3, err1+err2+err3)=min (least squares). And - according to the above explanation - A must contain only 1's and 0's, while having exactly one 1 per column.

Unfortunately I have no idea how to approach this problem. Can it be expressed in a way different from the matrix-vector form? Which tools in matlab could do it?

flok3r
  • 1
  • 1
  • 2
  • Are you looking for A or x ? – percusse Mar 06 '16 at 11:26
  • The typical solution for that is `x'\b'` but that wouldn't constrain the entries of A to be 1-0 integers. That's a more difficult problem goes by the name 0-1 linear programming. If you have more constraints then you might try to add them column sum is 1 row sum 1 etc to help the optimization. – percusse Mar 06 '16 at 11:29
  • Right, x'\b' would do it for arbitrary matrices A. Any idea on how to implement to 2 requirements for A? – flok3r Mar 06 '16 at 11:32

1 Answers1

0

I think I found the answer while parsing some sections of the Matlab documentation.

First of all, the problem can be rewritten as:

errSum=err1+err2+err3=3Ax-b1-b2-b3

=> dot_prod(errSum, errSum) = min(A)

Applying the dot product (least squares) yields a quadratic scalar expression.

Syntax-wise, the fmincon tool within the optimization box could do the job. It has constraints parameters, which allow to force Aij to be binary and each column to be 1 in sum.

But apparently fmincon is not ideal for binary problems algorithm-wise and the ga tool should be used instead, which can be called in a similar way.

Since the equation would be very long in my case and needs to be written out, I haven't tried yet. Please correct me, if I'm wrong. Or add further solution-methods, if available.

flok3r
  • 1
  • 1
  • 2