Re: Matrix Minimization
- To: mathgroup at smc.vnet.net
- Subject: [mg99801] Re: Matrix Minimization
- From: "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk>
- Date: Fri, 15 May 2009 04:16:35 -0400 (EDT)
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
To solve your particular problem you need to first use that log det M =
trace log M.
You will have to teach Mathematica the rules that it needs in order to
represent and manipulate your expression.
For instance, you could define (your posting was a bit garbled so I might
not have accurately transcribed the expression for your matrix.)
prod[ex] + prod[a, es, trans[a]] + prod[a, ep, trans[a]] +
prod[ex, trans[h]] + prod[a, es, trans[h]] + prod[h, ex] +
prod[h, es, trans[a]] + prod[h, ex, trans[h]] +
prod[h, es, trans[h]] + prod[eq];
which introduces prod and trans which represent
prod[x1,x2,...] is the matrix product x1.x2...
trans[x] is the matrix transpose of x
Make two further definitions in order to do simple manipulations on prod and
trans[x_ + y_] := trans[x] + trans[y];
prod[u___, x_ + y_, v___] := prod[u, x, v] + prod[u, y, v];
Now we are ready to differentiate mat[a] w.r.t. a.
mat[a + da] - mat[a]
prod[a, ep, trans[da]] + prod[a, es, trans[da]] +
prod[da, ep, trans[a]] + prod[da, ep, trans[da]] +
prod[da, es, trans[a]] + prod[da, es, trans[da]] +
prod[da, es, trans[h]] + prod[h, es, trans[da]]
and so on...
Variations on this general theme, where you make Mathematica definitions to
push the calculation along in the direction you would have followed "by
hand", will eventually solve your problem.
It is a good idea to read up all about Mathematica patterns before you try
West Malvern, UK
"math.mud.mad" <math.mud.mad at gmail.com> wrote in message
news:gugcb9$fjk$1 at smc.vnet.net...
> On May 14, 2:39 pm, dh <d... at metrohm.com> wrote:
>> you may minimize a real scalar but not a matrix. However, what you can
>> do is to minimize some measure like a Norm of the matrix.
>> Towards this aim, you will have to calculate e.g. Norm and then
>> minimize it.
>> math.mud.... at gmail.com wrote:
>> > Hi ,
>> > i would like to minimize the following matrix M with respect to A.
>> > M= E_X + A E_S A' + A E_P A' E_X H' +A E_S H'
>> > H E_X + H E_S A' H E_X H=
> ' + H E_S H' + E_Q
>> > where E_X, E_S, E_P and E_Q are covariance matrices..
>> > can we do matrix optimization in mathematica?
>> > thanks a lot..
> Hi Daniel,
> sorry for my mistake. i want to optimize log det (M) with respect to
> A. can i use mathematica for that?
Prev by Date:
Re: Re: Introducing the Wolfram Mathematica Tutorial
Next by Date:
Re: Introducing the Wolfram Mathematica Tutorial
Previous by thread:
Re: Matrix Minimization
Next by thread:
GuiKit, seeking some guidance and comments