home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / math / 18562 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.3 KB  |  66 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!psm
  3. From: psm@mullian.ee.mu.OZ.AU (Phil Malin)
  4. Subject: Taking derivative w.r.t. a matrix...
  5. Message-ID: <psm.727605195@murlibobo>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Computer Science, University of Melbourne, Australia
  8. Date: Thu, 21 Jan 1993 08:33:15 GMT
  9. Lines: 55
  10.  
  11. Hi all.
  12.  
  13. Previously someone posted a question about taking the derivative of
  14. a scalar function of a matrix w.r.t. the matrix, more precisely
  15.  
  16. if
  17.                 f=x^{T}Ax            (using Latex convention)
  18. then
  19.                 df/dA=xx^{T}
  20.  
  21. which is more apparent if we consider the problem in the following form;
  22.  
  23.                 f=sum_{i,j} a_{ij}x_{i}x_{j}
  24. so
  25.                 @f/@a_{ij}=x_{i}x_{j}
  26.  
  27. where @ is the partial derivative.
  28.  
  29. Even more previously I posted a question along the same lines but using
  30. tensors of rank two (or even higher) rather than matrices, so I would be
  31. taking the derivative of a scalar function w.r.t. a tensor of order
  32. greater than one.  Basically I was told (in a nice way) that it did not
  33. make sense :-)  Being an engineer it seems intuitive that the above
  34. formulation is correct but I was wondering if it was formally correct.
  35. To get the heart of the matter I'll briefly explain what I'm on about;
  36.  
  37. I have a function
  38.  
  39.                 y^{i}=f(z^{j})
  40.                 z^{j}=w^{j}_{k}x^{k}+b^{j}
  41.  
  42. which represents a simplified neuron.  I could use matrices and summations
  43. like everyone else but I think it looks nicer if I use this shorthand
  44. notation by defining the matrix as a (1,1) tensor, etc.  The problem comes
  45. when it comes time to compute the p.d. of y^{i} w.r.t. the tensor w^{i}_{j}.
  46. Again, intuitively (and consistent with everyone else's results) I obtain
  47.  
  48.                 @y^{i}/@w^{p}_{q}=f'^{i}_{p}()x^{q}
  49.  
  50. My question is - is this notation formally correct?  It seems obvious but
  51. that's not a good enough reason to accept it.
  52.  
  53. I might also add that sometimes this summation convention is a bit annoying.
  54. Normally y^{i}=0 for all z^{j} when i!=j, but if I write f'^{i}_{i} I get
  55. a summation which I don't want.  Is there any way around this.  Maybe
  56. the bottom line is not to use the tensor formulation.  Maybe (and this
  57. is the most probable reason) my formulation is incorrect to begin with.
  58. But I like to think that there is an elegant and formally correct expression
  59. of this problem.
  60.  
  61. Any help (and thoughts) would be appreciated.
  62.  
  63. Phil Malin.
  64. psm@mullian.ee.mu.oz.au
  65.  
  66.