Skip to main content
17 events
when toggle format what by license comment
Feb 21, 2021 at 19:22 history edited Carlo Beenakker CC BY-SA 4.0
deleted 459 characters in body
Feb 21, 2021 at 18:38 comment added spencer wilson Right, thank you! If you have any favorite references for matrix calculus, I would love to know.
Feb 21, 2021 at 18:20 comment added Carlo Beenakker yes, that is correct, with the understanding that there is no multiplication of the matrices $M^{k-1}$ and $M^{N-k}$ (that is why I prefer to write the indices out explicitly, otherwise the expression seems ambiquous)
Feb 21, 2021 at 17:48 comment added spencer wilson For your full solution, I think we can write this in matrix form where $\frac{\partial{f}}{\partial{A_{ij}}}=2\sum_{k=1}^N{x_k^Ty_k}$ and $x_k=(M^{k-1})^T(M^Nv-w)$ and $y_k=M^{N-k}v$. This makes the connection to the scalar case a little clearer perhaps. Both rank-1, and it looks like in the latter case the derivative finds interactions between different time steps of the Markov sequence, through $M^{k-1}M^{N-k}$...? So the full solution (but do confirm) is: $2\sum_{k=1}^N{(M^Nv-w)^TM^{k-1}M^{N-k}v}$.
Feb 21, 2021 at 16:26 comment added spencer wilson Thanks Professor! I've numerically confirmed the online calculator and your scalar perturbation results. I discovered the online calculator is performing elementwise exponentiation, explaining the discrepancy. I'm working now to convert your elementwise derivative to a matrix expression for computation. It seems a tensor product might help. Context: I'm working on gradient descent for Markov dynamical systems. If you have any references or suggestions to help me proceed with similar calculations, I would be very grateful. I'm hoping to compute second-order (Newton's method) as well.
Feb 21, 2021 at 16:16 history edited Carlo Beenakker CC BY-SA 4.0
added 459 characters in body
Feb 21, 2021 at 12:58 comment added Carlo Beenakker my answer for the elementwise derivative is not what I seem to get from this online calculator, which gives (if I understand the syntax correctly) that $\partial f/\partial A_{ij}= 2N(M^Nv-w)_i (M^{N-1})_{ij} v_j.$ I don't understand why. This latter result also does not satisfy the relation that the scalar derivative is the trace of the matrix of elementwise derivatives. Quite possibly I am missing something essential.
Feb 21, 2021 at 12:56 history edited Carlo Beenakker CC BY-SA 4.0
added 141 characters in body
Feb 21, 2021 at 12:38 history edited Carlo Beenakker CC BY-SA 4.0
added 141 characters in body
Feb 21, 2021 at 8:19 history edited Carlo Beenakker CC BY-SA 4.0
added 335 characters in body
Feb 20, 2021 at 23:33 comment added spencer wilson I see, this makes sense. Thank you. This calculator is interesting-- I'm not able to reproduce the scalar perturbation but it produces a nice-looking solution for a general derivative with input norm2((A-B*C).^N*v-w)^2. I'm curious to see if the answer there is interpretable to you. It's difficult for me to form an intuition about it unfortunately.
Feb 20, 2021 at 22:55 comment added Carlo Beenakker Yes, this is for a scalar perturbation, $f(A+\epsilon I)=f(A)+\epsilon \partial f/\partial A$. The expressions for the derivative with respect to a given matrix element of A are more lengthy, I will write them down tomorrow.
Feb 20, 2021 at 21:35 comment added spencer wilson Thanks Professor Beenakker. I'm a little confused why the gradient here is scalar, when I expected a gradient in terms of the elements of A? That is, I expect the gradient here to tell me the change in f(A) with respect to each element of A. What am I missing?
Feb 20, 2021 at 17:28 vote accept spencer wilson
Feb 20, 2021 at 15:57 vote accept spencer wilson
Feb 20, 2021 at 16:12
Feb 20, 2021 at 13:23 history edited Carlo Beenakker CC BY-SA 4.0
added 10 characters in body
Feb 20, 2021 at 13:18 history answered Carlo Beenakker CC BY-SA 4.0