Giter Club home page Giter Club logo

Comments (6)

rgiordan avatar rgiordan commented on June 15, 2024

I'm assigning myself this for the task of hard-coding the actual Hessian, not just the diagonal.

from celeste.jl.

rgiordan avatar rgiordan commented on June 15, 2024

Just curious, Jeff, do you have thoughts about what kind of data structure would be best for the Hessian object inside the SensitiveFloat? You know much more about the performance of different julia data types than I do.

I'm planning to treat the Hessian of the brightness (G in the derivations) differently from the Hessian of the ELBO, because the Hessian of G is only nonzero within a source. Also, we'll pretty much only write to the full Hessian once, whereas the G Hessians will need to be read again and again as we perform transforms on SensitiveFloats.

I'm currently just treating the G Hessians as length(ids) x length(ids)matrices. Most of the entries in these matrices are zeros most of the time. But I'm not sure if the lookup costs (and complexity) that would be associated with sparse matrices or some other custom data structure would be worth it.

Better to get your thoughts sooner rather than later!

from celeste.jl.

jeff-regier avatar jeff-regier commented on June 15, 2024

How about H::Vector{Matrix{Float64}}? The outer vector has one entry per
source. Each inner matrix is roughly 30x30, a dense matrix that stores the
block of the Hessian corresponding to a particular source.

An alternative is Array{Float64, 3}, but this is worse because until Julia
0.5 H[:,:,s] copies rather than returns a view without copying.

Another alternative is a sparse matrix. That's no good either since blocks
of it are dense, and we only want to compute the block diagonal anyway, I
think.

On Mon, Nov 16, 2015 at 3:35 PM Ryan [email protected] wrote:

Just curious, Jeff, do you have thoughts about what kind of data structure
would be best for the Hessian object inside the SensitiveFloat? You know
much more about the performance of different julia data types than I do.

I'm planning to treat the Hessian of the brightness (G in the derivations)
differently from the Hessian of the ELBO, because the Hessian of G is only
nonzero within a source. Also, we'll pretty much only write to the full
Hessian once, whereas the G Hessians will need to be read again and again
as we perform transforms on SensitiveFloats.

I'm currently just treating the G Hessians as length(ids) x length(ids)matrices.
Most of the entries in these matrices are zeros most of the time. But I'm
not sure if the lookup costs (and complexity) that would be associated with
sparse matrices or some other custom data structure would be worth it.

Better to get your thoughts sooner rather than later!


Reply to this email directly or view it on GitHub
#15 (comment)
.

from celeste.jl.

rgiordan avatar rgiordan commented on June 15, 2024

Cool, good to know. I had been using Array{Float64, 3} but I didn't realize that problem with copying. I'll do Vector{Matrix{Float64}}.

Could I also ask you to comment up the parameter stuff starting around line 400 of CelesteTypes.jl? I'm considering writing generic tools for taking functions of SensitiveFloats. To do that I will have to be able to define a SensitiveFloat of arbitrary size, but you've tied the SensitiveFloat type to the abstract ParamSet type which is used inside a bunch of meta-programming that I haven't managed to wrap my head around. (Sorry, I think it'll be quick for you to add a few comments and slow for me to try to figure out on my own what's going on in there. My julia meta programming chops are not so good.)

from celeste.jl.

jeff-regier avatar jeff-regier commented on June 15, 2024

Hey Ryan, I'll add some comments but I can't get to it today. That block of
metaprogramming didn't turn out to be a slick as I'd hoped: you should feel
free to modify/delete it as you see fit. My aim was to use the type system
in Julia to control how different types of derivatives related to each
other, without any run time penalty, but now I think there must have been a
better way

On Mon, Nov 16, 2015 at 3:54 PM Ryan [email protected] wrote:

Cool, good to know. I had been using Array{Float64, 3} but I didn't
realize that problem with copying. I'll do Vector{Matrix{Float64}}.

Could I also ask you to comment up the parameter stuff starting around
line 400 of CelesteTypes.jl? I'm considering writing generic tools for
taking functions of SensitiveFloats. To do that I will have to be able to
define a SensitiveFloat of arbitrary size, but you've tied the
SensitiveFloat type to the abstract ParamSet type which is used inside a
bunch of meta-programming that I haven't managed to wrap my head around.
(Sorry, I think it'll be quick for you to add a few comments and slow for
me to try to figure out on my own what's going on in there. My julia meta
programming chops are not so good.)


Reply to this email directly or view it on GitHub
#15 (comment)
.

from celeste.jl.

rgiordan avatar rgiordan commented on June 15, 2024

Done in 33ae77a.

whew

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