提交 5e6dbf3d authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Took the docstrings from numpy.

I think it is a bit more clearer as documentation compared to the text I've wrote.
上级 3301d8d8
...@@ -478,10 +478,12 @@ class CholeskyGrad(Op): ...@@ -478,10 +478,12 @@ class CholeskyGrad(Op):
class MatrixPinv(Op): class MatrixPinv(Op):
"""Computes the pseudo-inverse of a matrix :math:`A`. """Computes the pseudo-inverse of a matrix :math:`A`.
Given a matrix :math:`A` of shape ``(d1, d2)``, ``pinv`` returns a The pseudo-inverse of a matrix A, denoted :math:`A^+`, is
matrix :math:`A_{pinv}` of ``(d2, d1)`` such that the dot product defined as: "the matrix that 'solves' [the least-squares problem]
:math:`A_{inv} \cdot A` is as close as poosible to the identity :math:`Ax = b`," i.e., if :math:`\bar{x}` is said solution, then
matrix :math:`I`. :math:`A^+` is that matrix such that :math:`\bar{x} = A^+b`.
Note that :math:`Ax=AA^+b`, so :math:`AA^+` is close to the identity matrix.
""" """
def __init__(self): def __init__(self):
pass pass
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论