Jump to content
  • Advertisement
Sign in to follow this  
shaobohou

need help with differentiation

This topic is 4268 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is it possible to compute the derivative of y^{T}(K+C)^{-1}y with respect to either K or C? Can the answer even be computed simply? y is a vector and K and C are square matrices. thanks Shaobo

Share this post


Link to post
Share on other sites
Advertisement
If it can be computed simply something like a TI-92 will spit out something or choke.
At least that's what I used to use when I had a question like yours or even better use mathematica or some other symbolic differentation software.

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
If it can be computed simply something like a TI-92 will spit out something or choke.
At least that's what I used to use when I had a question like yours or even better use mathematica or some other symbolic differentation software.


What is a TI-92?

I don't have access to Mathematica, is it more advanced than matlab's symbolic toolbox? That does not appear to have direct support for linear algebra, making the differentiation somewhat difficult.

Any suggestions for good symbolic differentiation softwares that can handle linear algebra?

Share this post


Link to post
Share on other sites
A TI-92 is a calculator made by Texas Instruments (TI). I have a TI-83 Plus, but I doubt it could compute that, I don't know how to differentiate a vector or take a vector to a power of a matrix or whatever that equation says. Anyways, a TI-92 is a very good graphing calclulator that is really great for derivitives and intergals and what not.

Share this post


Link to post
Share on other sites
Partial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

Share this post


Link to post
Share on other sites
Quote:
Original post by DaBookshah
Partial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

Maybe if we had more info on how this original problem relates to game programming we would have a better idea?

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
Quote:
Original post by DaBookshah
Partial differentiation with respect to a component I can understand, but with respect to a whole matrix, how is that defined? Is it defined?

Maybe if we had more info on how this original problem relates to game programming we would have a better idea?


well, it may be slightly off topic but I am trying to compute is fairly general. I am basically trying compute the derivative of the Mahalanobis distance http://en.wikipedia.org/wiki/Mahalanobis_distance. Since the result is a scalar, derivative with respect to the matrix K should be another matrix.

I use it as part of an algorithm to cluster some animation data.

Share this post


Link to post
Share on other sites
Computing the derivative of yTC-1y:

(C+E)-1=(C(I+C-1E))-1=(I+C-1E)-1C-1=(I-C-1E+C-1EC-1E-...)C-1=C-1-C-1EC-1+O(||E||2),

so

yT(C+E)-1y=yTC-1y-yTC-1EC-1y+O(||E||2)

and there you have your linear functional (-(yTC-1)•(C-1y)). If you want it in a standard form tr •X, take X=-(C-1y)(yTC-1)=-||y||2C-2, but for raw calculations the form above is just as good.

disclaimer: I assume no responsibility for mangled signs and inappropriate transposes.

Share this post


Link to post
Share on other sites
thanks very much, it looks promising, from what little I know of matrix inversion identities. I was trying to work it out from the matrix inversion lemma but I wasn't quite clever enough.

Anyway, I'll let you know how I get on with it.

Quote:
Original post by Darkstrike
Computing the derivative of yTC-1y:

(C+E)-1=(C(I+C-1E))-1=(I+C-1E)-1C-1=(I-C-1E+C-1EC-1E-...)C-1=C-1-C-1EC-1+O(||E||2),



Actually, if you can give some sort of short explanation for what is happening here, that would be great. It looks like some sort of taylor expansion is going on. And what does this O(||E||2) mean?

thanks

[Edited by - shaobohou on November 11, 2006 9:28:43 AM]

Share this post


Link to post
Share on other sites

This topic is 4268 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!