Code Monkey home page Code Monkey logo

Comments (5)

dlfivefifty avatar dlfivefifty commented on June 23, 2024

Hi @cscherrer, I had a brief look at Stan but not sure I see the connection. The main point of this package is to provide types that implement in, such as UnitDisk (norm(x) ≤ 1).

There are also maps between domains, maybe this is what you are interested in?

from domainsets.jl.

cscherrer avatar cscherrer commented on June 23, 2024

Yes, there are a few needs:

  • Represent the support (set of nonzero densities) of a distribution. A few important ones are the unit interval, positive reals, and simplex
  • Map between any continuous of these and ℝ^n
  • Track Jacobian of this transformation

Is this not a good use case for your package? I had looked into using TransformVariables.jl which seems great, but may not have as much flexibility of representing different spaces as your approach.

from domainsets.jl.

dlfivefifty avatar dlfivefifty commented on June 23, 2024

I think this is a good use case for representing the domains. @daanhb might have comments about support for Jacobians.

from domainsets.jl.

daanhb avatar daanhb commented on June 23, 2024

In principle, the stance of the package is that the Jacobian of a map is itself a map.

The minimal amount of information about a map is which types it maps between (these are the type parameters S and T) and an implementation of applymap: this should take an argument x of type S and return something of type T. It is not assumed that maps are invertible, and there is support for specifying left and right inverses. (This flexibility helps to decide membership of a domain in case the dimensions of the spaces of a map differ.)

It is a pretty flexible framework. However, it hasn't been used much yet, and so there aren't many examples I'm afraid.

There is an example of a map in circle.jl. The AngleMap and UnitCircleMap describe the map from the interval to a circle and back. These do not (yet) have jacobians implemented.

An example of a Jacobian is in affine_maps.jl: the jacobian of any linear map is a constant map, see line 14. The affine maps are currently the most used and most developed ones. Compared to some other implementations in other Julia packages, it is not assumed that the matrix is square (i.e. it is not assumed that the map is uniquely invertible).

from domainsets.jl.

cscherrer avatar cscherrer commented on June 23, 2024

That should give me a good start. Thank you!

from domainsets.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.