Code Monkey home page Code Monkey logo

Comments (13)

torfjelde avatar torfjelde commented on May 29, 2024 2

Sweet! I'll make a PR for Bijectors.jl 👍

from stheno.jl.

ElOceanografo avatar ElOceanografo commented on May 29, 2024

For reference, running the following (copied from here and here) before running the Turing model fixes the error:

Bijectors.bijector(d::Stheno.FiniteGP) = Identity{1}()
for T in (:VectorOfMultivariate, :FillVectorOfMultivariate)
    @eval begin
        Bijectors.bijector(d::Bijectors.$T{Continuous, <:Stheno.FiniteGP}) = Identity{2}()
    end
end

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Thanks for opening this. I'll try and take a look soon.

from stheno.jl.

nucklass avatar nucklass commented on May 29, 2024

Ran into a similar problem trying to use a logit link and bernoulli likelihood function. Is the above still the best solution to this?

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Hmm I guess.

@torfjelde do you know what's going on here?

from stheno.jl.

torfjelde avatar torfjelde commented on May 29, 2024

Yeah, I'd say so. Not too long ago we removed the "default"-implementations, which was to just use Identity if we didn't recognize the distribution. Unfortunately that lead to a lot of silent bugs, hence we now require explicit implementation of bijector. And the above solution by @ElOceanografo is good:)

EDIT: Ideally that should just be made part of the package implementing the distribution, but we're probably not quite there yet for Bijectors.jl.

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Ah I see. @torfjelde what's the correct place to solve this? Bijectors has quite a lot of deps that I'm not keen to take on in Stheno, so I would prefer not to have to use it here just to solve Turing integration.

from stheno.jl.

torfjelde avatar torfjelde commented on May 29, 2024

Well, I guess that kind means that we haven't done our job correctly, haha. The idea was for Bijectors.jl to be lightweight so that anyone who's using Distributions.jl wouldn't have any issues also depending on Bijectors.jl.

Are there any particular dependencies that makes this an issue?

With the exception of Roots, NNlib and MappedArrays I think we have essentially the same deps as Distributions.jl, no?

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Oh interesting. I actually hadn't noticed that / hadn't realised how lightweight all of those packages are.

I think I'm probably okay depending on Bijectors then. Could someone @torfjelde @ElOceanografo make a PR to Stheno to incorporate this?

A good place to add this would be another file in the util directory. Should be included below here in Stheno.jl:
https://github.com/willtebbutt/Stheno.jl/blob/f0f78aae68122d01b582296fea186715ecf88a96/src/Stheno.jl#L65

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Although, actually, @torfjelde is bijector defined for AbstractMvNormal, or just MvNormal? If it's the former then the FiniteGP could just subtype AbstractMvNormal instead of ContinuousMultivariateDistribution.

from stheno.jl.

torfjelde avatar torfjelde commented on May 29, 2024

Ah, awesome!:)

And we're currently implementing it for MvNormal, but don't see any reason why we shouldn't do it for AbstractMvNormal, so we could at least make that change on Bijectors.jl's end 👍

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Fantastic. I'll change things on my end, then hopefully it will "just work".

from stheno.jl.

willtebbutt avatar willtebbutt commented on May 29, 2024

Will leave this open until we've got new versions tagged.

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