Skip to content

Instantly share code, notes, and snippets.

View anishpatel's full-sized avatar

Anish Patel anishpatel

View GitHub Profile

$$ L(A,F) = \frac{1}{K}|R\circ(S-AF)|_2^2. $$

Compute the partial derivatives of $L$ with respect $A$ and $F$. Show that $$\frac{\partial L}{\partial A} = \frac{-2}{K}[R\circ(S-AF)]F^\top.$$ and $$\frac{\partial L}{\partial F} = \frac{-2}{K}A^\top[R\circ(S-AF)].$$

import scala.collection.immutable.List;
abstract class ForkJoin {
protected def getList[T]: List[T]
def apply[A, B]: (List[A], List[B]) = {
(getList[A], getList[B])
}
}
#!/usr/bin/env python3
def echoeval(expr_str):
global sys, pprint
try: sys
except NameError: import sys
try: pprint
except NameError: from pprint import pprint
calling_frame = sys._getframe().f_back
print(expr_str, '=', end=' ')