Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Add sensitivities for pinv #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add sensitivities for pinv #174

wants to merge 1 commit into from

Conversation

ararslan
Copy link
Collaborator

@ararslan ararslan commented Jun 6, 2019

Ported from autograd

Ported from autograd
@ararslan ararslan requested a review from willtebbutt June 6, 2019 22:15
@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

Merging #174 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
+ Coverage   94.87%   94.89%   +0.01%     
==========================================
  Files          21       21              
  Lines         781      783       +2     
==========================================
+ Hits          741      743       +2     
  Misses         40       40
Impacted Files Coverage Δ
src/sensitivities/linalg/generic.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aa0c20...1893157. Read the comment docs.

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs an improved reference :)

@@ -128,3 +128,10 @@ function ∇(::typeof(exp), ::Type{Arg{1}}, p, Y, Ȳ, X::AbstractMatrix)
F = factorize(Uᵀ)
return real(F \ (Uᵀ * Ȳ / F .* Z) * Uᵀ)
end

# Ported from autograd, which uses https://mathoverflow.net/questions/25778/analytical-...
# formula-for-numerical-derivative-of-the-matrix-pseudo-inverse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the academic reference here as well:
Golub, Gene H., and Victor Pereyra. "The differentiation of pseudo-inverses and nonlinear least squares problems whose variables separate." SIAM Journal on numerical analysis 10.2 (1973): 413-432.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants