David Widmann

Results 1468 comments of David Widmann

The ForwardDiff issue is not related to PDMats: ```julia julia> using PDMats, ForwardDiff, LinearAlgebra julia> x = [1. 0.2; 0.2 1.]; julia> ForwardDiff.gradient(det ∘ PDMat, x) 2×2 Matrix{Float64}: 1.0 -0.4...

Actually, I don't think there's anything wrong with the derivatives of ForwardDiff and `cholesky`, the forward-mode sensitivities of `cholesky` are correct (compare e.g. with https://arxiv.org/abs/1602.07527). It's just that `ForwardDiff.gradient(det \circ...

> Especially because using a Symmetric wrapper fails: This is a general issue with `ForwardDiff.seed!`, not limited to `Symmetric` and not related to `cholesky`.

The only things to make it work with Zygote are (copied from above): > Probably one should restrict rrule(::typeof(det), ...) in the same way as the one for logdet: https://github.com/JuliaDiff/ChainRules.jl/pull/245...

> About where the discretemeasure should be, I'm guessing it should be on OptimalTransport.jl, but that would make ExactOptimalTransport dependent on it, no? Ideally we would generalize `DiscreteNonParametric` in Distributions...

@davibarreira Sorry, I was busy with other things last week and missed the messages here. My main point is that 1. it should not be restricted to multivariate distributions 2....

Maybe you can make a PR to Distributions and then I can explain how it could be generalized?

> Although, if I understand Distributions.jl correctly. They have a hardline between Univariate and Multivariate. So my code just followed this idea. I just created a MvDiscreteNonParametric distribution. These two...

> I intend to make it compatible also with MeasureTheory.jl, so there might be a reason for it even if it get's incorporated to Distributions.jl. There are ongoing discussion for...

I think it's too early to say if/what advantages would be of a separate package. But I think that currently a PR to Distributions would be preferable.