Giter VIP home page Giter VIP logo

Comments (7)

tpapp avatar tpapp commented on May 27, 2024

I consider calculating the log determinant of the Jacobian major functionality, and I am not sure how you would implement that with optics. See transform_and_logjac.

Also, a lot of transformations are nonlinear mappings.

Are you sure you read the manual?

from transformvariables.jl.

aplavin avatar aplavin commented on May 27, 2024

Also, a lot of transformations are nonlinear mappings.

See logs in my example, nonlinear functions work just fine.

calculating the log determinant of the Jacobian

Thanks for pointing this out! Not sure if I totally understand what exactly is meant by Jacobian here. It's commonly defined for vector-to-vector functions, but what's a Jacobian of NamedTuple function as((μ = asℝ, σ = asℝ₊, τ = asℝ₊, θs = as(Array, 8)))?

Optics can easily be differentiated, I regularly compute gradients with them. But don't understand what you mean by Jacobian.

from transformvariables.jl.

tpapp avatar tpapp commented on May 27, 2024

See https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant#Jacobian_determinant, https://en.wikipedia.org/wiki/Integration_by_substitution#Substitution_for_multiple_variables, and the docs.

from transformvariables.jl.

aplavin avatar aplavin commented on May 27, 2024

Yes, that's the definition of log-Jacobian for functions R^n -> R^n (vector -> vector). But what's a Jacobian of a vector -> namedtuple function?

from transformvariables.jl.

tpapp avatar tpapp commented on May 27, 2024

The Jacobian of the result flattened to a vector. (Edit: for non-bijective transforms, a subset, eg the upper triangle of correlation matrices).

from transformvariables.jl.

aplavin avatar aplavin commented on May 27, 2024

I see... This very specific functionality is not available out of the box in Accessors. One can use regular autodiff there to find gradients/jacobians/..., but need to specify both input(s) and output(s) of the differentiated function instead of them being implicit.
Sorry for bothering with the suggestion then. I made this issue just because earlier at some point I used TransformVariables for transform/inverse, and now optics replaced that functionality for me.

from transformvariables.jl.

tpapp avatar tpapp commented on May 27, 2024

No worries, suggestions are always welcome. Yes, this functionality is very specific to Bayesian estimation / MCMC. I will close the issue for now as I think it is resolved, but if you comment I will reopen it.

from transformvariables.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.